Skip to content

Commit 54ca4d7

Browse files
committed
fix: remove some unneeded text
1 parent f6fe25a commit 54ca4d7

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

docs/pages/transactions/retries.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ slug: wallets/transactions/retries
5656
function waitForUserOperationTransactionPromise(hash: `0x${string}`) {
5757
return new Promise<`0x${string}`>((resolve, reject) => {
5858
waitForUserOperationTransaction(
59-
{ hash, retries: { maxRetries: 3, intervalMs: 500 } },
59+
{ hash, retries: { maxRetries: 3, intervalMs: 5_000 } },
6060
{ onSuccess: resolve, onError: reject },
6161
);
6262
});
@@ -75,6 +75,7 @@ slug: wallets/transactions/retries
7575
if (params.maxReplacements <= 0) throw e;
7676
const { hash: newHash } =
7777
await dropAndReplaceUserOperation({ uoToDrop: params.request });
78+
console.log("Replaced user operation hash:", newHash);
7879
return waitUntilMinedWithRetries({
7980
hash: newHash as `0x${string}`,
8081
request: params.request,
@@ -95,11 +96,12 @@ slug: wallets/transactions/retries
9596
},
9697
});
9798

98-
await waitUntilMinedWithRetries({
99+
const minedTxHash = await waitUntilMinedWithRetries({
99100
hash,
100101
request,
101102
maxReplacements: MAX_REPLACEMENTS,
102103
});
104+
console.log("Mined transaction hash:", minedTxHash);
103105
}}
104106
disabled={
105107
isSendingUserOperation ||
@@ -122,8 +124,6 @@ slug: wallets/transactions/retries
122124
}
123125
```
124126

125-
You can also build a more complex retry logic in a case you want more control over how many times you want to retry a failed user operation.
126-
127127
</Tab>
128128
<Tab title="JavaScript">
129129

@@ -186,7 +186,5 @@ slug: wallets/transactions/retries
186186

187187
</CodeBlocks>
188188

189-
In the above example, we only try to drop and replace once before failing completely, but you can build more complex retry logic using this combination of `waitForUserOperationTransaction` and `dropAndReplace`.
190-
191189
</Tab>
192190
</Tabs>

docs/shared/infra/drop-and-replace-description.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
In the previous guides, we learned how to send user operations with gas sponsorship, but what happens when a user operation fails to mine? In this guide,
2-
we'll cover how to use drop and replace to resend failing user operations and ensure they get mined.
3-
41
## What is drop and replace?
52

63
If fees change and your user operation gets stuck in the mempool, you can use drop and replace to resend the user operation with higher fees. This is most useful

0 commit comments

Comments
 (0)