fix: missing import

refactor: unify geth transaction between eth and erc20 tokens
This commit is contained in:
Sérgio Salgado 2021-06-10 17:41:34 +01:00 committed by Josh Harvey
parent 8e099e3283
commit de832e435b
2 changed files with 11 additions and 58 deletions

View file

@ -6,7 +6,7 @@ function truncateCrypto (cryptoAtoms, cryptoCode) {
const DECIMAL_PLACES = 3
if (cryptoAtoms.eq(0)) return cryptoAtoms
const scale = utils.getCryptoCurrency(cryptoCode).displayScale
const scale = coinUtils.getCryptoCurrency(cryptoCode).displayScale
const scaleFactor = BN(10).pow(scale)
return BN(cryptoAtoms).truncated().div(scaleFactor)