From c1c462af78cb85a9e8c776cef1b5bf1caaaae7ae Mon Sep 17 00:00:00 2001 From: Wojciech Turek Date: Wed, 30 Mar 2022 16:39:25 +0200 Subject: [PATCH] Fix bug causing users to be unable to claim reward --- background/redux-slices/earn.ts | 4 ++-- background/services/internal-ethereum-provider/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/background/redux-slices/earn.ts b/background/redux-slices/earn.ts index da0efb70ca..e64df4dc61 100644 --- a/background/redux-slices/earn.ts +++ b/background/redux-slices/earn.ts @@ -375,8 +375,8 @@ export const claimVaultRewards = createBackgroundAsyncThunk( signer ) const tx = await vaultContract.functions["getReward()"]() - await signer.sendTransaction(tx) - + const response = signer.sendTransaction(tx) + await tx.wait(response) dispatch(updateEarnedValues()) } ) diff --git a/background/services/internal-ethereum-provider/index.ts b/background/services/internal-ethereum-provider/index.ts index 9e77dc2851..8b254505a1 100644 --- a/background/services/internal-ethereum-provider/index.ts +++ b/background/services/internal-ethereum-provider/index.ts @@ -122,6 +122,7 @@ export default class InternalEthereumProviderService extends BaseService )}` case "eth_blockNumber": case "eth_call": + case "eth_estimateGas": case "eth_feeHistory": case "eth_gasPrice": case "eth_getBalance": @@ -194,7 +195,6 @@ export default class InternalEthereumProviderService extends BaseService case "metamask_sendDomainMetadata": case "wallet_requestPermissions": case "wallet_watchAsset": - case "eth_estimateGas": case "estimateGas": // --- eip1193-bridge only method -- case "eth_coinbase": // --- MM only methods --- case "eth_decrypt":