Skip to content

Commit

Permalink
fix: Always skip gas estimation step from Wagmi
Browse files Browse the repository at this point in the history
  • Loading branch information
cgero-eth committed Nov 12, 2024
1 parent 8b60ba3 commit dd5ac60
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/hooks/useSendTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,9 @@ export const useSendTransaction = (
resetSendTransactionWagmi();

// Set gas to null to skip wagmi gas estimation and allow users to still
// send the transaction to their wallet when gas-estimation fails
const gas = isEstimateGasError ? null : undefined;
sendTransactionWagmi({...transaction, gas});
}, [
sendTransactionWagmi,
resetSendTransactionWagmi,
transaction,
isEstimateGasError,
]);
// send the transaction to their wallet
sendTransactionWagmi({...transaction, gas: null});
}, [sendTransactionWagmi, resetSendTransactionWagmi, transaction]);

return {
isEstimateGasError,
Expand Down

0 comments on commit dd5ac60

Please sign in to comment.