feat: change to generic ERC-20 ABI json file

fix: coinUtils rename import
This commit is contained in:
Sérgio Salgado 2021-06-10 01:43:22 +01:00 committed by Josh Harvey
parent dff407e30e
commit 8e099e3283
36 changed files with 364 additions and 249 deletions

View file

@ -26,7 +26,7 @@ const { cassetteMaxCapacity } = require('./constants')
const notifier = require('./notifier')
const { utils } = require('lamassu-coins')
const { utils: coinUtils } = require('lamassu-coins')
const mapValuesWithKey = _.mapValues.convert({
cap: false
@ -204,7 +204,7 @@ function plugins (settings, deviceId) {
const cashInFee = BN(commissions.fixedFee)
const cashInCommission = BN(commissions.cashIn)
const cashOutCommission = _.isNumber(commissions.cashOut) ? BN(commissions.cashOut) : null
const cryptoRec = utils.getCryptoCurrency(cryptoCode)
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
return {
cryptoCode,
@ -335,7 +335,7 @@ function plugins (settings, deviceId) {
const lowBalanceMargin = BN(1.03)
const cryptoRec = utils.getCryptoCurrency(cryptoCode)
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
const unitScale = cryptoRec.unitScale
const shiftedRate = rate.shift(-unitScale)
const fiatTransferBalance = balance.mul(shiftedRate).div(lowBalanceMargin)