mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
FIX: Writing numbers standards #194
This commit is contained in:
parent
aee5f407ee
commit
3035747af3
3 changed files with 3 additions and 11 deletions
|
@ -33,7 +33,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>228</string>
|
||||
<string>229</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
@ -110,7 +110,7 @@ strings.formatBalance = (balance, toUnit, withFormatting = false) => {
|
|||
return balance + ' ' + BitcoinUnit.BTC;
|
||||
} else if (toUnit === BitcoinUnit.SATS) {
|
||||
const value = new BigNumber(balance).multipliedBy(100000000);
|
||||
return (withFormatting ? new Intl.NumberFormat().format(value.toString()).replace(',', ' ') : value) + ' ' + BitcoinUnit.SATS;
|
||||
return (withFormatting ? new Intl.NumberFormat().format(value.toString()).replace(/[^0-9]/g, ' ') : value) + ' ' + BitcoinUnit.SATS;
|
||||
} else if (toUnit === BitcoinUnit.LOCAL_CURRENCY) {
|
||||
return currency.BTCToLocalCurrency(balance);
|
||||
}
|
||||
|
@ -131,7 +131,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(',', ' ') : balance;
|
||||
return withFormatting ? new Intl.NumberFormat().format(balance).replace(/[^0-9]/g, ' ') : balance;
|
||||
} else if (toUnit === BitcoinUnit.LOCAL_CURRENCY) {
|
||||
return currency.satoshiToLocalCurrency(balance);
|
||||
}
|
||||
|
|
|
@ -68,14 +68,6 @@ export default class WalletsImport extends Component {
|
|||
try {
|
||||
// is it lightning custodian?
|
||||
if (text.indexOf('blitzhub://') !== -1 || text.indexOf('lndhub://') !== -1) {
|
||||
// yep its lnd
|
||||
for (let t of BlueApp.getWallets()) {
|
||||
if (t.type === LightningCustodianWallet.type) {
|
||||
// already exist
|
||||
return alert('Only 1 Ligthning wallet allowed for now');
|
||||
}
|
||||
}
|
||||
|
||||
let lnd = new LightningCustodianWallet();
|
||||
lnd.setSecret(text);
|
||||
await lnd.authorize();
|
||||
|
|
Loading…
Add table
Reference in a new issue