Skip to content

Commit

Permalink
Merge pull request #483 from HausDAO/fix/wc-prop-request-error
Browse files Browse the repository at this point in the history
Fix issue when external apps request WC proposal to estimate gas
  • Loading branch information
skuhlmann authored Mar 29, 2024
2 parents 454a54f + 1865e46 commit 0113897
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libs/moloch-v3-fields/src/utils/walletConnectV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,18 @@ const useWalletConnectV2 = (): useWalletConnectType => {
});
break;
}
case 'eth_estimateGas': {
// notice: we don't require to estimate gas for the individual contract call to build the proposal calldata
await web3wallet.respondSessionRequest({
topic,
response: {
id,
jsonrpc: '2.0',
result: '0x0', // notice: respond zero gas by default
},
});
break;
}
default: {
const errorMsg = 'Tx type not supported';
setError(errorMsg);
Expand Down

0 comments on commit 0113897

Please sign in to comment.