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: nonce discrepancy issues when there's a pending txn #683

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

borislav-itskov
Copy link
Member

Change log:

  • rename nonce to currentAccountNonce in estimate.ts for more readability. EstimateResult should always return the current nonce, or the one the user will commit to in case of a execute() authrorization
  • if there's a discrepancy in the accountOp.nonce and the (outcome.nonce - 1), we 1) return an error in signAccountOp and do not allow the user to sign 2) set the found nonce from the estimation in accountOp as the true nonce and wait for simulation & estimation reruns

@borislav-itskov borislav-itskov added the bug Something isn't working label Apr 1, 2024
@borislav-itskov borislav-itskov marked this pull request as draft April 1, 2024 16:03
@borislav-itskov borislav-itskov marked this pull request as ready for review April 1, 2024 16:16
@borislav-itskov borislav-itskov marked this pull request as draft April 1, 2024 16:29
@borislav-itskov borislav-itskov marked this pull request as ready for review April 2, 2024 06:31
@Ivshti
Copy link
Member

Ivshti commented Apr 2, 2024

lgtm

@borislav-itskov borislav-itskov merged commit aa784dd into v2 Apr 2, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants