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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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); |
|
|
|
} |
|
|
|