fix: cash-out fixed fee name

This commit is contained in:
Rafael 2024-12-19 12:12:59 +00:00
parent 01b8981bb7
commit 146c173aeb
2 changed files with 5 additions and 3 deletions

View file

@ -51,7 +51,7 @@ const mapValuesWithKey = _.mapValues.convert({cap: false})
function convertBigNumFields (obj) { function convertBigNumFields (obj) {
const convert = (value, key) => { const convert = (value, key) => {
if (_.includes(key, [ 'cryptoAtoms', 'receivedCryptoAtoms', 'fiat', 'fixedFee', 'fixedFeeCrypto' ])) { if (_.includes(key, [ 'cryptoAtoms', 'receivedCryptoAtoms', 'fiat', 'fixedFee' ])) {
return value.toString() return value.toString()
} }

View file

@ -40,7 +40,7 @@ function massage (tx, pi) {
: { : {
cryptoAtoms: new BN(r.cryptoAtoms), cryptoAtoms: new BN(r.cryptoAtoms),
fiat: new BN(r.fiat), fiat: new BN(r.fiat),
fixedFee: new BN(r.fixedFee), fixedFee: r.cashOutFee ? new BN(r.cashOutFee) : null,
rawTickerPrice: r.rawTickerPrice ? new BN(r.rawTickerPrice) : null, rawTickerPrice: r.rawTickerPrice ? new BN(r.rawTickerPrice) : null,
commissionPercentage: new BN(r.commissionPercentage) commissionPercentage: new BN(r.commissionPercentage)
} }
@ -51,7 +51,9 @@ function massage (tx, pi) {
const mapper = _.flow( const mapper = _.flow(
transformDates, transformDates,
mapBN, mapBN,
_.unset('dirty')) _.unset('dirty'),
_.unset('cashOutFee')
)
return mapper(tx) return mapper(tx)
} }