From d0d0963bb5904a15cf0355862d62dd141ce0c31c Mon Sep 17 00:00:00 2001 From: "insomnia.exe" <31802208+AndriyAntonenko@users.noreply.github.com> Date: Wed, 6 Nov 2024 01:17:00 +0200 Subject: [PATCH] fix: waitForTransactionReceipt proper eth_call usage (#4339) * fix: waitForTransactionReceipt proper eth_call usage * chore: tweaks --------- Co-authored-by: Tom Meagher --- .changeset/red-trains-switch.md | 5 +++++ packages/core/src/actions/waitForTransactionReceipt.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/red-trains-switch.md diff --git a/.changeset/red-trains-switch.md b/.changeset/red-trains-switch.md new file mode 100644 index 0000000000..bf6523eb55 --- /dev/null +++ b/.changeset/red-trains-switch.md @@ -0,0 +1,5 @@ +--- +"@wagmi/core": patch +--- + +Fixed bug in `waitForTransactionReceipt`, where transaction data wasn't passed to `'eth_call'` method as part of getting the revert reason. diff --git a/packages/core/src/actions/waitForTransactionReceipt.ts b/packages/core/src/actions/waitForTransactionReceipt.ts index 4203fac7e7..5ac8fcdb20 100644 --- a/packages/core/src/actions/waitForTransactionReceipt.ts +++ b/packages/core/src/actions/waitForTransactionReceipt.ts @@ -67,6 +67,7 @@ export async function waitForTransactionReceipt< const action_call = getAction(client, call, 'call') const code = await action_call({ ...(txn as any), + data: txn.input, gasPrice: txn.type !== 'eip1559' ? txn.gasPrice : undefined, maxFeePerGas: txn.type === 'eip1559' ? txn.maxFeePerGas : undefined, maxPriorityFeePerGas: