Skip to content

Commit

Permalink
make token balance math more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
skubakdj committed Oct 26, 2017
1 parent 818bf64 commit bc4b801
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/libs/nodes/web3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export default class Web3Node implements INode {
return resolve(new Big(0));
}

resolve(new Big(res.toString()).div(new Big(10).pow(token.decimal)));
const bigResult = new Big(res.toString());
const bigTokenBase = new Big(10).pow(token.decimal);

resolve(bigResult.div(bigTokenBase));
}
);
});
Expand Down

0 comments on commit bc4b801

Please sign in to comment.