Skip to content

Commit

Permalink
Split test: Parse new balances as floats
Browse files Browse the repository at this point in the history
  • Loading branch information
LefterisJP committed Apr 29, 2016
1 parent 09693c1 commit 982e3c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/scenarios/split/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def tokens_after_split(votes, original_balance, dao_balance, reward_tokens):

for vote, orig in zip(votes, original_balance):
if vote:
new_dao_balance.append(orig * dao_balance / totalSupply)
new_dao_balance.append(orig * dao_balance / float(totalSupply))
old_dao_balance.append(0)
rewardToMove = float(orig) * reward_tokens / float(totalSupply)
old_reward_tokens -= float(rewardToMove)
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/split/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ setTimeout(function() {
oldDAOBalance = [];
newDAOBalance = [];
for (i = 0; i < eth.accounts.length; i++) {
oldDAOBalance.push(parseInt(web3.fromWei(dao.balanceOf(eth.accounts[i]))));
newDAOBalance.push(parseInt(web3.fromWei(newdao.balanceOf(eth.accounts[i]))));
oldDAOBalance.push(parseFloat(web3.fromWei(dao.balanceOf(eth.accounts[i]))));
newDAOBalance.push(parseFloat(web3.fromWei(newdao.balanceOf(eth.accounts[i]))));
}
addToTest('oldDAOBalance', oldDAOBalance);
addToTest('newDAOBalance', newDAOBalance);
Expand Down

0 comments on commit 982e3c2

Please sign in to comment.