Skip to content

Commit

Permalink
docs: add note to check constructor for retry opts params (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
avasisht23 committed Nov 3, 2023
1 parent e30d733 commit 8a7c4fb
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions site/packages/aa-core/provider/waitForUserOperationTransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ head:

Attempts to fetch for UserOperationReceipt `txMaxRetries` amount of times, at an interval of `txRetryIntervalMs` milliseconds (with a multiplier of `txRetryMulitplier`) using the connected account.

Note: For more details on how to modify the retry configurations for this method, see the [constructor](/packages/aa-core/provider/constructor.md) parameters.

## Usage

::: code-group
Expand All @@ -30,8 +32,8 @@ const userOperationResult = await provider.sendUserOperation({
});

// [!code focus:99]
provider.waitForUserOperationTransaction({
hash: result.hash,
const txHash = await provider.waitForUserOperationTransaction({
hash: userOperationResult.hash,
});
```

Expand All @@ -51,15 +53,3 @@ If `txMaxRetries` is exceeded without the user operation included in a block yet
### `hash: Hash`

The hash of the user operation returned from [sendUserOperation](./sendUserOperation).

::: code-group

```ts [example.ts]
import { provider } from "./provider";
// [!code focus:99]
provider.waitForUserOperationTransaction({
hash: "0xUserOpResultHash", // [!code focus]
});
```

:::

0 comments on commit 8a7c4fb

Please sign in to comment.