-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
feat: make polling input generic #4752
Conversation
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.
clean and beautiful change. Thank you!
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 to Me!
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. Great work.
The goal of this release is to release #4752, where the polling controller input was made more flexible. It's a major breaking change to all polling controllers. Dependent controllers the tool thought should be released are included too. --------- Co-authored-by: Jongsun Suh <[email protected]>
## **Description** Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) ## **Related issues** Related to MetaMask/MetaMask-planning#3568 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Update the `@metamask/gas-fee-controller` package to v21 to satisfy the peer dependency on `@metamask/network-controller@^21.0.0`, and update the `@metamask/user-operation-controller` to satisfy its peer dependency upon `@metamask/gas-fee-controller`. Note that an older version of `@metamask/gas-fee-controller` (v18) remains in the dependency tree, but only because it's imported by `@metamask/smart-transaction-controller` for type reasons. It has no runtime impact on the application, so the associated peer dependency warnings from this older release can be ignored. This will be eliminated soon, in an upcoming PR. The updated `@metamask/user-operation-controller` still does not have its peer dependencies satisfied, but the problems are pre-existing. The `@metamask/keyring-controller` and `@metamask/transaction-controller` packages are head of where this package expects them to be. This is not made worse by this PR though, and will be addressed in a future PR. Changelogs: - `@metamask/gas-fee-controller@21`: https://github.com/MetaMask/core/blob/main/packages/gas-fee-controller/CHANGELOG.md#2100 - One breaking change with an impact: >The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (MetaMask/core#4752) - `@metamask/user-operation-controller@16`: https://github.com/MetaMask/core/blob/main/packages/user-operation-controller/CHANGELOG.md#1600 - No breaking changes with an impact. It appeared at first that the `startPollingByNetworkClientId` was breaking, but the user operation controller had an override for that method so it was preserved ([see here](https://github.com/MetaMask/core/pull/4752/files#diff-335af05ece636eb593b348e369dff139dfbfea49ad4e9ba3bb47b4909aab9aefR304)) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28745?quickstart=1) Related to MetaMask/MetaMask-planning#3568 N/A N/A - [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. - [ ] 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. --------- Co-authored-by: MetaMask Bot <[email protected]>
Explanation
Allow the polling controllers to accept generic input when starting a poll.
Today they accept:
But controllers may want unique polling loops over other data.
This PR allows controllers to use any serializable type as their polling input. Controllers pass their input type as a generic argument to the base class, making it more type safe than then previous
options: Json
.An example of how this would be used in the future, is how
CurrencyRateController
only needs a polling loop for each unique native currency. So it would define:And you would initiate polling with:
References
Changelog
@metamask/polling-controller
startPollingByNetworkClientId
is nowstartPolling
. AndonPollingComplete
now returns the entire input object, instead of a network client id.Checklist