FIX: Error when paying invoice

This commit is contained in:
Marcos Rodriguez Vélez 2019-01-06 15:55:50 -05:00
parent c0a137a965
commit 950d9ac8ff
4 changed files with 4 additions and 3 deletions

View file

@ -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);
}}

View file

@ -33,7 +33,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>218</string>
<string>219</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View file

@ -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);
}

View file

@ -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);