You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The official OpenZeppelin Defender SDK documentation shows an example using tx.wait() to wait for a transaction to be mined. However, the tx object returned by sendTransaction does not have a .wait() method. This discrepancy can cause confusion for developers.
In sending transaction part of documentation. it says to use tx.wait()
Expected Behavior:
The documentation should reflect the correct approach for waiting for transactions to be mined. For example, using getRelayerTransaction or a blockchain provider like Ethers.js.
Actual Behavior:
The tx object returned by sendTransaction does not have a .wait() method, leading to a TypeError. this is same issue with all 3 ways using solidity, Ether.js, Web3.js
Suggested Fix:
Update the documentation to reflect the correct approach for waiting for transactions. For example:
const tx = await relayer.sendTransaction({ ... });
// Poll for transaction status
let minedTx;
while (true) {
minedTx = await client.relay.getRelayerTransaction(tx.transactionId);
if (minedTx.status === 'mined') {
console.log('Transaction mined:', minedTx);
break;
}
console.log('Waiting for transaction to be mined...');
await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait 5 seconds
}
Additional Context:
This issue was encountered while working with the Defender SDK to send gasless transactions. The documentation should be updated to avoid confusion and provide clear guidance on how to wait for transactions to be mined. I know issue is too small and simple but can be avoided.
The text was updated successfully, but these errors were encountered:
The official OpenZeppelin Defender SDK documentation shows an example using tx.wait() to wait for a transaction to be mined. However, the tx object returned by sendTransaction does not have a .wait() method. This discrepancy can cause confusion for developers.
In sending transaction part of documentation. it says to use tx.wait()
Ex:
Error: TypeError: tx.wait is not a function
Expected Behavior:
The documentation should reflect the correct approach for waiting for transactions to be mined. For example, using getRelayerTransaction or a blockchain provider like Ethers.js.
Actual Behavior:
The tx object returned by sendTransaction does not have a .wait() method, leading to a TypeError. this is same issue with all 3 ways using solidity, Ether.js, Web3.js
Environment:
Defender SDK version: 2.0.0
Node.js version: 23.x
Suggested Fix:
Update the documentation to reflect the correct approach for waiting for transactions. For example:
Additional Context:
This issue was encountered while working with the Defender SDK to send gasless transactions. The documentation should be updated to avoid confusion and provide clear guidance on how to wait for transactions to be mined. I know issue is too small and simple but can be avoided.
The text was updated successfully, but these errors were encountered: