feat: change to generic ERC-20 ABI json file
fix: coinUtils rename import
This commit is contained in:
parent
dff407e30e
commit
8e099e3283
36 changed files with 364 additions and 249 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue