Merge pull request #1821 from lamassu/releases/v10.2

Releases/v10.2
This commit is contained in:
Rafael Taranto 2025-04-14 14:42:32 +01:00 committed by GitHub
commit 6f1b0c6e5f

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()
}