Skip to content

Commit 85d3936

Browse files
committed
fix: reword
1 parent 54ca4d7 commit 85d3936

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/pages/transactions/retries.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ slug: wallets/transactions/retries
88

99
<Tabs>
1010
<Tab title="React">
11-
The drop and replace functionality is supported using the `useDropAndReplaceUserOperation()` hook. User operations can be seamlessly retried by:
11+
Use the provided `useDropAndReplaceUserOperation()` hook to drop and replace. You can retry a user operation by:
1212

13-
1. Using the `useSendUserOperation()` hook, which supplies a `sendUserOperationAsync()` method to send the initial user operation; this returns a hash for the pending user operation
14-
2. Using the `useWaitForUserOperationTransaction()` hook to wait on the pending user operation
15-
3. Using the `useDropAndReplaceUserOperation()` hook if the user operation is stuck in the mempool to cancel the existing operation and resubmit a user operation with an adjusted gas fee
13+
1. Calling `sendUserOperationAsync()` from `useSendUserOperation()` to send the initial user operation; it returns the pending user operation hash
14+
2. Using the `useWaitForUserOperationTransaction()` hook to wait for the pending user operation
15+
3. Using the `useDropAndReplaceUserOperation()` hook if the user operation is stuck in the mempool to cancel the existing operation and resubmit with an adjusted gas fee
1616

17-
This example implements the above flow and is wrapped in a retry function that will retry the flow a configurable number of times.
17+
The example below implements this flow and wraps it in a retry helper with a configurable number of attempts.
1818

1919
```tsx twoslash
2020
import React from "react";
@@ -134,12 +134,12 @@ slug: wallets/transactions/retries
134134

135135
<Markdown src="../../shared/infra/client.mdx" />
136136

137-
Once you've initialized it you can:
138-
1. Call `sendUserOperation()` to send the initial user operation; this returns a hash for the pending user operation
139-
2. Call `waitForUserOperationTransaction({ hash })` on the pending user operation
140-
3. If `waitForUserOperationTransaction({ hash })` errors, you can drop and replace it with `dropAndReplaceUserOperation()`
137+
Once initialized, you can:
138+
1. Send the initial user operation with `sendUserOperation()`; it returns the pending user operation hash
139+
2. Wait for the pending user operation with `waitForUserOperationTransaction({ hash })`
140+
3. If `waitForUserOperationTransaction({ hash })` errors, drop and replace with `dropAndReplaceUserOperation()`
141141

142-
This example implements the above flow and is wrapped in a retry function that will retry the flow a configurable number of times.
142+
The example then wraps this flow in a retry helper with a configurable number of attempts.
143143

144144
```ts twoslash example.ts
145145
import { client } from "./client";

0 commit comments

Comments
 (0)