mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
Wrap tx creation in a try catch
This commit is contained in:
parent
2f20186719
commit
57da0926d1
1 changed files with 8 additions and 1 deletions
|
@ -205,7 +205,14 @@ export default class SendDetails extends Component {
|
|||
}
|
||||
|
||||
let startTime = Date.now();
|
||||
tx = this.state.fromWallet.createTx(utxo, this.state.amount, fee, this.state.address, this.state.memo);
|
||||
try {
|
||||
tx = this.state.fromWallet.createTx(utxo, this.state.amount, fee, this.state.address, this.state.memo);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
alert(loc.send.details.create_tx_error);
|
||||
this.setState({ isLoading: false });
|
||||
return;
|
||||
}
|
||||
let endTime = Date.now();
|
||||
console.log('create tx ', (endTime - startTime) / 1000, 'sec');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue