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 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:
12
12
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
16
16
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.
0 commit comments