mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
feat(deuro-error-handling): Enhance error handling for Deuro Savings Transactions.
This commit is contained in:
commit
d6a30beb42
1 changed files with 6 additions and 5 deletions
|
@ -89,11 +89,12 @@ class DEuro {
|
||||||
final sendTransaction = () => _wallet.getWeb3Client()!.sendRawTransaction(signedTransaction);
|
final sendTransaction = () => _wallet.getWeb3Client()!.sendRawTransaction(signedTransaction);
|
||||||
|
|
||||||
return PendingEVMChainTransaction(
|
return PendingEVMChainTransaction(
|
||||||
sendTransaction: sendTransaction,
|
sendTransaction: sendTransaction,
|
||||||
signedTransaction: signedTransaction,
|
signedTransaction: signedTransaction,
|
||||||
fee: BigInt.from(fee.estimatedGasFee),
|
fee: BigInt.from(fee.estimatedGasFee),
|
||||||
amount: amount.toString(),
|
amount: amount.toString(),
|
||||||
exponent: 18);
|
exponent: 18,
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.toString().contains('insufficient funds for gas')) {
|
if (e.toString().contains('insufficient funds for gas')) {
|
||||||
final ethBalance = await _wallet.getWeb3Client()!.getBalance(_address);
|
final ethBalance = await _wallet.getWeb3Client()!.getBalance(_address);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue