Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: waitForUserOperationTx parameters were incorrect #634

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented Apr 30, 2024

Pull Request Checklist


PR-Codex overview

This PR enhances the waitForUserOperationTransaction function in the smart account module by adding support for custom exponential backoff parameters.

Detailed summary

  • Added retries object to WaitForUserOperationTxParameters for custom backoff settings
  • Updated waitForUserOperationTransaction function to use custom backoff settings if provided

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link
Contributor

@avasisht23 avasisht23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few qs but looks good

@@ -86,6 +86,25 @@ export type DropAndReplaceUserOperationParameters<
//#region WaitForUserOperationTxParameters
export type WaitForUserOperationTxParameters = {
hash: Hex;
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to reuse these from the client opts schema?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did, but then didn't want to perpetuate zod cuz it's annoying in some places

for (let i = 0; i < client.txMaxRetries; i++) {
const {
hash,
retries = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these aren't provided is this going to use what the client passes in? I don't see that in the diff

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea that's what this line does, the destructue with the equals is setting the default value if it's not passed in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh neat okay

@moldy530 moldy530 merged commit 8250c66 into main Apr 30, 2024
3 checks passed
@moldy530 moldy530 deleted the moldy/fix-wait-for-tx branch April 30, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants