Merge pull request #1819 from RafaelTaranto/fix/backwards-compatibility-cashout-fixed-fee

LAM-1381 fix: backwards compatibility on cashout fixed fee
This commit is contained in:
Rafael Taranto 2025-04-14 11:20:02 +01:00 committed by GitHub
commit 071a65d491

View file

@ -52,6 +52,9 @@ const mapValuesWithKey = _.mapValues.convert({cap: false})
function convertBigNumFields (obj) {
const convert = (value, key) => {
if (_.includes(key, [ 'cryptoAtoms', 'receivedCryptoAtoms', 'fiat', 'fixedFee' ])) {
// BACKWARDS_COMPATIBILITY 10.1
// bills before 10.2 don't have fixedFee
if (key === 'fixedFee' && !value) return new BN(0).toString()
return value.toString()
}