Merge pull request #1777 from RafaelTaranto/fix/cash-out-fixed-fee

LAM-222 fix: cash-out fixed fee name
This commit is contained in:
Rafael Taranto 2024-12-21 18:31:20 +00:00 committed by GitHub
commit f473d49198
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)
} }