UNPKG

spacylabs-rhino

Version:
12 lines (9 loc) 250 B
const BN = require('bignumber.js') module.exports = (dvf, token, amount) => { const tokenInfo = dvf.token.getTokenInfo(token) return new BN(10) .pow(tokenInfo.decimals) .times(amount) .integerValue(BN.ROUND_FLOOR) .toString() }