-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Making permission and approval controller methods idempotent #15848
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
jpuri
force-pushed
the
permission_approval_method_idempotent
branch
from
September 15, 2022 18:39
fb5c96e
to
9868acc
Compare
digiwand
previously approved these changes
Sep 15, 2022
… permission_approval_method_idempotent
…taMask/metamask-extension into permission_approval_method_idempotent
The PR should be merged only after this change is included in extension code: MetaMask/core#909 |
segun
previously approved these changes
Sep 16, 2022
…taMask/metamask-extension into permission_approval_method_idempotent
… permission_approval_method_idempotent
…taMask/metamask-extension into permission_approval_method_idempotent
… permission_approval_method_idempotent
Builds ready [988f0ab]
Page Load Metrics (2128 ± 82 ms)
|
digiwand
reviewed
Oct 25, 2022
…taMask/metamask-extension into permission_approval_method_idempotent
Builds ready [911116c]
Page Load Metrics (2636 ± 158 ms)
|
digiwand
approved these changes
Oct 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
darkwing
approved these changes
Oct 28, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #15714
Make these methods idempotent by adding exception handling in MetamaskController:
The methods above can throw error if they see same request again, for instance of we try to revoker a permission by calling
permissionController.revokePermissions
and the permission is already revoked it will throw error.Catching these error like done in this PR will help making the methods behaviour idempotent when called multiple times from UI.