Browse Source

Merge pull request #236 from BlueWallet/fix-negative-amount-satoshi

FIX: send amount in satoshi wasnt with minus in tx list
map
Marcos Rodriguez Vélez 6 years ago
committed by GitHub
parent
commit
72791d0481
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      loc/index.js

2
loc/index.js

@ -122,7 +122,7 @@ strings.formatBalanceWithoutSuffix = (balance, toUnit, withFormatting = false) =
const value = new BigNumber(balance).dividedBy(100000000).toFixed(8);
return removeTrailingZeros(value);
} else if (toUnit === BitcoinUnit.SATS) {
return withFormatting ? new Intl.NumberFormat().format(balance).replace(/[^0-9]/g, ' ') : balance;
return (balance < 0 ? '-' : '') + (withFormatting ? new Intl.NumberFormat().format(balance).replace(/[^0-9]/g, ' ') : balance);
} else if (toUnit === BitcoinUnit.LOCAL_CURRENCY) {
return currency.satoshiToLocalCurrency(balance);
}

Loading…
Cancel
Save