-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
chore: profile sync controller - add snap caching #4532
Merged
Prithpal-Sooriya
merged 2 commits into
main
from
NOTIFY-847-profile-sync-controller-add-snap-caching
Jul 18, 2024
Merged
chore: profile sync controller - add snap caching #4532
Prithpal-Sooriya
merged 2 commits into
main
from
NOTIFY-847-profile-sync-controller-add-snap-caching
Jul 18, 2024
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
making multiple calls to snaps can cause an internal 429 too many requests as snap requests are queued. This adds simple in-mem caching to prevent calling the snap with the same values
Prithpal-Sooriya
added
the
team-notifications
Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications
label
Jul 17, 2024
mathieuartu
reviewed
Jul 18, 2024
packages/profile-sync-controller/src/controllers/authentication/AuthenticationController.ts
Show resolved
Hide resolved
matteoscurati
approved these changes
Jul 18, 2024
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!
Prithpal-Sooriya
deleted the
NOTIFY-847-profile-sync-controller-add-snap-caching
branch
July 18, 2024 14:51
7 tasks
Prithpal-Sooriya
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 19, 2024
## **Description** This is a series of fixes added to core libraries. Adding to extension, and soon we will migrate extension to use shared libraries. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25946?quickstart=1) ## **Related issues** MetaMask/core#4530 MetaMask/core#4531 MetaMask/core#4532 MetaMask/core#4533 MetaMask/core#4536 #25749 ## **Manual testing steps** 1. Create multiple accounts 2. Go to notification settings page 3. Wait for settings to load, and try toggling notifications Before: some settings would error or not load After: you should be able to toggle accounts and not see errors. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** [<!-- [screenshots/recordings] -->](#25749) ### **After** https://www.loom.com/share/49b582e8c33b4199bdafc994a3f6087f?sid=9f94a885-351b-4fee-84d8-f72c97506e7d ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Prithpal-Sooriya
added a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 19, 2024
## **Description** This is a series of fixes added to core libraries. Adding to extension, and soon we will migrate extension to use shared libraries. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25946?quickstart=1) ## **Related issues** MetaMask/core#4530 MetaMask/core#4531 MetaMask/core#4532 MetaMask/core#4533 MetaMask/core#4536 #25749 ## **Manual testing steps** 1. Create multiple accounts 2. Go to notification settings page 3. Wait for settings to load, and try toggling notifications Before: some settings would error or not load After: you should be able to toggle accounts and not see errors. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** [<!-- [screenshots/recordings] -->](#25749) ### **After** https://www.loom.com/share/49b582e8c33b4199bdafc994a3f6087f?sid=9f94a885-351b-4fee-84d8-f72c97506e7d ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Merged
7 tasks
chloeYue
pushed a commit
to MetaMask/metamask-extension
that referenced
this pull request
Jul 19, 2024
) ## **Description** This is a cherry pick for #25946 (003ee98) ------ This is a series of fixes added to core libraries. Adding to extension, and soon we will migrate extension to use shared libraries. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25946?quickstart=1) ## **Related issues** MetaMask/core#4530 MetaMask/core#4531 MetaMask/core#4532 MetaMask/core#4533 MetaMask/core#4536 #25749 ## **Manual testing steps** 1. Create multiple accounts 2. Go to notification settings page 3. Wait for settings to load, and try toggling notifications Before: some settings would error or not load After: you should be able to toggle accounts and not see errors. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** [<!-- [screenshots/recordings] -->](#25749) ### **After** https://www.loom.com/share/49b582e8c33b4199bdafc994a3f6087f?sid=9f94a885-351b-4fee-84d8-f72c97506e7d ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
team-notifications
Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications
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.
Explanation
making multiple calls to snaps can cause an internal 429 too many requests as snap requests are queued. This adds simple in-mem caching to prevent calling the snap with the same values.
References
NOTIFY-847
Changelog
@metamask/profile-sync-controller
Checklist