mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
FIX: Error when paying invoice
This commit is contained in:
parent
c0a137a965
commit
950d9ac8ff
4 changed files with 4 additions and 3 deletions
|
@ -1134,6 +1134,7 @@ export class BlueBitcoinAmount extends Component {
|
|||
{...this.props}
|
||||
keyboardType="numeric"
|
||||
onChangeText={text => {
|
||||
text = text.replace(',', '.');
|
||||
text = this.props.unit === BitcoinUnit.BTC ? text.replace(/[^0-9.]/g, '') : text.replace(/[^0-9]/g, '');
|
||||
this.props.onChangeText(text);
|
||||
}}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>218</string>
|
||||
<string>219</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
@ -108,7 +108,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()) : balance + ' ' + BitcoinUnit.SATS;
|
||||
return withFormatting ? new Intl.NumberFormat().format(value.toString()) : value + ' ' + BitcoinUnit.SATS;
|
||||
} else if (toUnit === BitcoinUnit.LOCAL_CURRENCY) {
|
||||
return currency.BTCToLocalCurrency(balance);
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ export default class ScanLndInvoice extends React.Component {
|
|||
let start = +new Date();
|
||||
let end;
|
||||
try {
|
||||
await fromWallet.payInvoice(this.state.invoice, this.state.invoice.num_satoshis);
|
||||
await fromWallet.payInvoice(this.state.invoice, this.state.decoded.num_satoshis);
|
||||
end = +new Date();
|
||||
} catch (Err) {
|
||||
console.log(Err.message);
|
||||
|
|
Loading…
Add table
Reference in a new issue