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

Add error message for invalid nonce error #355

Merged
merged 2 commits into from
Jun 13, 2022

Conversation

jonasalexander
Copy link
Contributor

@jonasalexander jonasalexander commented Jun 8, 2022

Adds an error message that gives context if the nonce is invalid. This will help with the UX of wallets and users deploying account contracts who currently see an error message that only talks about two felts being different when they should be the same, without any context.

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

@jonasalexander jonasalexander marked this pull request as ready for review June 8, 2022 20:20
@andrew-fleming
Copy link
Collaborator

Thanks, @jonasalexander! This is looking good. Would you be so kind as to check that the error message properly returns in the Account tests? A simple refactor here with assert_revert should suffice:
https://github.com/OpenZeppelin/cairo-contracts/blob/main/tests/account/test_Account.py#L133-L147

Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

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

Thank you!

@andrew-fleming andrew-fleming merged commit a1404d4 into OpenZeppelin:main Jun 13, 2022
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