FIX: Hide loading indicator after push

This commit is contained in:
Marcos Rodriguez 2019-12-11 22:17:09 -05:00 committed by Overtorment
parent 5b1515ee3f
commit 748ec94bb4

View file

@ -495,8 +495,6 @@ export default class SendDetails extends Component {
this.setState({ isLoading: false }); this.setState({ isLoading: false });
return; return;
} }
this.setState({ isLoading: false }, () =>
this.props.navigation.navigate('Confirm', { this.props.navigation.navigate('Confirm', {
recipients: [firstTransaction], recipients: [firstTransaction],
// HD wallet's utxo is in sats, classic segwit wallet utxos are in btc // HD wallet's utxo is in sats, classic segwit wallet utxos are in btc
@ -509,8 +507,8 @@ export default class SendDetails extends Component {
fromWallet: this.state.fromWallet, fromWallet: this.state.fromWallet,
tx: tx, tx: tx,
satoshiPerByte: actualSatoshiPerByte.toFixed(2), satoshiPerByte: actualSatoshiPerByte.toFixed(2),
}), });
); this.setState({ isLoading: false });
}); });
} }
@ -543,14 +541,12 @@ export default class SendDetails extends Component {
// watch-only wallets with enabled HW wallet support have different flow. we have to show PSBT to user as QR code // watch-only wallets with enabled HW wallet support have different flow. we have to show PSBT to user as QR code
// so he can scan it and sign it. then we have to scan it back from user (via camera and QR code), and ask // so he can scan it and sign it. then we have to scan it back from user (via camera and QR code), and ask
// user whether he wants to broadcast it // user whether he wants to broadcast it
this.setState({ isLoading: false }, () =>
this.props.navigation.navigate('PsbtWithHardwareWallet', { this.props.navigation.navigate('PsbtWithHardwareWallet', {
memo: this.state.memo, memo: this.state.memo,
fromWallet: wallet, fromWallet: wallet,
psbt, psbt,
}), });
); this.setState({ isLoading: false });
return; return;
} }
@ -560,7 +556,6 @@ export default class SendDetails extends Component {
memo: this.state.memo, memo: this.state.memo,
}; };
await BlueApp.saveToDisk(); await BlueApp.saveToDisk();
this.setState({ isLoading: false }, () =>
this.props.navigation.navigate('Confirm', { this.props.navigation.navigate('Confirm', {
fee: new BigNumber(fee).dividedBy(100000000).toNumber(), fee: new BigNumber(fee).dividedBy(100000000).toNumber(),
memo: this.state.memo, memo: this.state.memo,
@ -568,8 +563,8 @@ export default class SendDetails extends Component {
tx: tx.toHex(), tx: tx.toHex(),
recipients: targets, recipients: targets,
satoshiPerByte: requestedSatPerByte, satoshiPerByte: requestedSatPerByte,
}), });
); this.setState({ isLoading: false });
} }
onWalletSelect = wallet => { onWalletSelect = wallet => {