-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Integrate PollingController mixin with GasFeeController #1673
Conversation
900c3d5
to
9fa253a
Compare
e936134
to
1844af4
Compare
Generally this looks good! Will give it a more detailed review later |
0ef971b
to
41ccfc8
Compare
290ac3b
to
20199c3
Compare
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
I suspect that CI will not let us use the new package in the gas fee controller package until we merge and release it separately |
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.
Looks great! Maybe we can move the new package into a separate PR and get that merged and released to unblock the gas fee controller changes.
## Explanation > Originally was in #1673 but pulled out to get this in on its own. Adds an abstract class (currently named `PollingController`. The start and stop methods are parameterized by `networkClientId`'s and `pollingToken`'s and polling intervals are stored in class variables by `chainId` so that multiple `networkClients`/`chainIds` can poll simultaneously. `executePoll` is an abstract method to be implemented by the controller itself so that this pattern could be generalized and be agnostic to what is being executed on the polling interval. ## References Related to #1673 Related to https://github.com/MetaMask/MetaMask-planning/issues/1314 --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
7bb1699
to
9bd377b
Compare
283b09b
to
20e9ea3
Compare
) ## Explanation Adds missing dependency introduced in #1673 ## References - Follow-up to: #1673 ## Changelog ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate --------- Co-authored-by: Alex <adonesky@gmail.com>
## Explanation > Originally was in #1673 but pulled out to get this in on its own. Adds an abstract class (currently named `PollingController`. The start and stop methods are parameterized by `networkClientId`'s and `pollingToken`'s and polling intervals are stored in class variables by `chainId` so that multiple `networkClients`/`chainIds` can poll simultaneously. `executePoll` is an abstract method to be implemented by the controller itself so that this pattern could be generalized and be agnostic to what is being executed on the polling interval. ## References Related to #1673 Related to MetaMask/MetaMask-planning#1314 --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
Integrates recently introduced [`PollingController` mixin](#1736) with `GasFeeController`. Leaves old polling pattern in pace for now so as to not force a ton of breaking changes for mobile, but with intention to activate new pattern in both clients ASAP. Addresses: MetaMask/MetaMask-planning#1314
) ## Explanation Adds missing dependency introduced in #1673 ## References - Follow-up to: #1673 ## Changelog ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate --------- Co-authored-by: Alex <adonesky@gmail.com>
## Explanation > Originally was in #1673 but pulled out to get this in on its own. Adds an abstract class (currently named `PollingController`. The start and stop methods are parameterized by `networkClientId`'s and `pollingToken`'s and polling intervals are stored in class variables by `chainId` so that multiple `networkClients`/`chainIds` can poll simultaneously. `executePoll` is an abstract method to be implemented by the controller itself so that this pattern could be generalized and be agnostic to what is being executed on the polling interval. ## References Related to #1673 Related to MetaMask/MetaMask-planning#1314 --------- Co-authored-by: Alex Donesky <adonesky@gmail.com>
Integrates recently introduced [`PollingController` mixin](#1736) with `GasFeeController`. Leaves old polling pattern in pace for now so as to not force a ton of breaking changes for mobile, but with intention to activate new pattern in both clients ASAP. Addresses: MetaMask/MetaMask-planning#1314
) ## Explanation Adds missing dependency introduced in #1673 ## References - Follow-up to: #1673 ## Changelog ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate --------- Co-authored-by: Alex <adonesky@gmail.com>
) ## Explanation Adds missing dependency introduced in #1673 ## References - Follow-up to: #1673 ## Changelog ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate --------- Co-authored-by: Alex <adonesky@gmail.com>
Integrates recently introduced
PollingController
mixin withGasFeeController
. Leaves old polling pattern in pace for now so as to not force a ton of breaking changes for mobile, but with intention to activate new pattern in both clients ASAP.Addresses: https://github.com/MetaMask/MetaMask-planning/issues/1314