Skip to content

Commit

Permalink
Merge pull request #38 from harpagon210/mainnet
Browse files Browse the repository at this point in the history
fixing decimal places setting
  • Loading branch information
harpagon210 committed Jun 11, 2019
2 parents acffa68 + 0c14873 commit aafe690
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/SmartContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ class SmartContracts {

const rng = seedrandom(`${prevRefSteemBlockId}${refSteemBlockId}${transactionId}`);

// init bignumber decimal places
if (refSteemBlockNumber > 33719500) {
BigNumber.set({ DECIMAL_PLACES: 20 });
} else {
BigNumber.set({ DECIMAL_PLACES: 3 });
}

// initialize the state that will be available in the VM
const vmState = {
api: {
Expand Down

0 comments on commit aafe690

Please sign in to comment.