diff --git a/.changeset/odd-fans-tickle.md b/.changeset/odd-fans-tickle.md new file mode 100644 index 00000000000..14d622b5d00 --- /dev/null +++ b/.changeset/odd-fans-tickle.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Add transaction hash to max wait time error diff --git a/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.test.ts b/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.test.ts index 8037f804833..42b3b55a302 100644 --- a/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.test.ts +++ b/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.test.ts @@ -101,7 +101,7 @@ describe("waitForReceipt", () => { } await expect(result).rejects.toThrow( - `Transaction not found after ${10} blocks`, + `Transaction receipt for ${MOCK_TX_HASH} not found after 10 blocks`, ); expect(mockEthGetTransactionReceipt).toHaveBeenCalledTimes(10); }); diff --git a/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.ts b/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.ts index db928a448c9..25949602a0f 100644 --- a/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.ts +++ b/packages/thirdweb/src/transaction/actions/wait-for-tx-receipt.ts @@ -72,7 +72,7 @@ export function waitForReceipt( unwatch(); reject( new Error( - `Transaction not found after ${maxBlocksWaitTime} blocks`, + `Transaction receipt for ${transactionHash} not found after ${maxBlocksWaitTime} blocks`, ), ); return;