FIX: cant send onchain when scanning QR with address & amount

This commit is contained in:
Overtorment 2020-06-24 20:23:56 +01:00
parent d697ff66a0
commit 03c7f7e92c
2 changed files with 5 additions and 0 deletions

View file

@ -50,6 +50,7 @@ export default class Confirm extends Component {
async componentDidMount() {
console.log('send/confirm - componentDidMount');
console.log('address = ', this.state.recipients);
if (!this.state.recipients || !this.state.recipients.length) alert('Internal error: recipients list empty (this should never happen)');
this.isBiometricUseCapableAndEnabled = await Biometric.isBiometricUseCapableAndEnabled();
}

View file

@ -516,6 +516,10 @@ export default class SendDetails extends Component {
const value = parseInt(transaction.amountSats);
if (value > 0) {
targets.push({ address: transaction.address, value });
} else if (transaction.amount) {
if (currency.btcToSatoshi(transaction.amount) > 0) {
targets.push({ address: transaction.address, value: currency.btcToSatoshi(transaction.amount) });
}
}
}