diff --git a/src/components/header/ClaimWarningBanner.vue b/src/components/header/ClaimWarningBanner.vue new file mode 100644 index 000000000..f2ab354d9 --- /dev/null +++ b/src/components/header/ClaimWarningBanner.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/header/Header.vue b/src/components/header/Header.vue index 675bdd9f2..80b6057f0 100644 --- a/src/components/header/Header.vue +++ b/src/components/header/Header.vue @@ -24,6 +24,8 @@ + + diff --git a/src/v2/services/implementations/MetamaskWalletService.ts b/src/v2/services/implementations/MetamaskWalletService.ts index cbdd561dd..d9249e1be 100644 --- a/src/v2/services/implementations/MetamaskWalletService.ts +++ b/src/v2/services/implementations/MetamaskWalletService.ts @@ -124,9 +124,12 @@ export class MetamaskWalletService extends WalletService implements IWalletServi try { const web3 = new Web3(this.provider as any); const rawTx = await getRawEvmTransaction(web3, from, to, data, value); + + // Memo: passing this variable (estimatedGas) to `sendTransaction({gas: estimatedGas})` causes an error when sending `withdrawal` transactions. + // the function goes the catch statement if something goes wrong while getting the estimatedGas. This way, the UI prevents sending invalid transactions which could cause loss of assets. const estimatedGas = await web3.eth.estimateGas(rawTx); const transactionHash = await web3.eth - .sendTransaction({ ...rawTx, gas: estimatedGas }) + .sendTransaction({ ...rawTx }) .once('transactionHash', (transactionHash) => { this.eventAggregator.publish(new BusyMessage(true)); })