Skip to content

Commit a58b887

Browse files
author
Oren Sokolowsky
committed
tests
1 parent 9b77162 commit a58b887

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/genesisprotocol.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,11 +1844,11 @@ contract('GenesisProtocol', accounts => {
18441844
addTime = (await testSetup.genesisProtocol.proposals(proposalId)).secondsFromTimeOutTillExecuteBoosted.toNumber();
18451845
//check the time is in a resonable range
18461846
assert.equal(((addTime <= 18) && (addTime >=15)),true);
1847-
var expectedBounty = new web3.utils.BN((addTime*user2Stake/15000).toString());
1847+
var expectedBounty = new web3.utils.BN(Math.floor(addTime*user2Stake/15000).toString());
18481848
assert.equal(tx.logs[3].event, "ExpirationCallBounty");
18491849
assert.equal(tx.logs[3].args._proposalId, proposalId);
18501850
assert.equal(tx.logs[3].args._beneficiary, accounts[0]);
1851-
assert.equal(tx.logs[3].args._amount.toString(), expectedBounty.toString());
1851+
assert.equal(tx.logs[3].args._amount.toString().substring(0,15), expectedBounty.toString().substring(0,15));
18521852
assert.equal((await testSetup.genesisProtocol.proposals(proposalId)).secondsFromTimeOutTillExecuteBoosted.toNumber(),addTime);
18531853
var totalStakesLeftAfterCallBounty = (new web3.utils.BN(totalStakes)).sub(expectedBounty);
18541854
assert.equal((await testSetup.stakingToken.balanceOf(testSetup.genesisProtocol.address)).eq(totalStakesLeftAfterCallBounty),true);

0 commit comments

Comments
 (0)