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

feat: make polling input generic #4752

Merged
merged 6 commits into from
Oct 10, 2024
Merged

feat: make polling input generic #4752

merged 6 commits into from
Oct 10, 2024

Conversation

bergeron
Copy link
Contributor

@bergeron bergeron commented Oct 1, 2024

Explanation

Allow the polling controllers to accept generic input when starting a poll.

Today they accept:

networkClientId: NetworkClientId,
options: Json

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:

type CurrencyRatePollingInput = {
  nativeCurrency: string;
};

And you would initiate polling with:

const currencyRateController = new(...);
const token1 = currencyRateController.startPolling({nativeCurrency: 'ETH'});
const token2 = currencyRateController.startPolling({nativeCurrency: 'POL'});

References

Changelog

@metamask/polling-controller

  • BREAKING: The input to start polling is now a generic type that can be any input, instead of requiring a network client id like before. The functions interfaces are updated to accommodate this. startPollingByNetworkClientId is now startPolling. And onPollingComplete now returns the entire input object, instead of a network client id.

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
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@bergeron bergeron changed the title make polling input generic feat: make polling input generic Oct 3, 2024
@bergeron bergeron marked this pull request as ready for review October 3, 2024 15:11
@bergeron bergeron requested review from a team as code owners October 3, 2024 15:11
Copy link
Contributor

@jiexi jiexi left a 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!

Copy link
Contributor

@adonesky1 adonesky1 left a 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!

Copy link
Contributor

@kanthesha kanthesha left a comment

Choose a reason for hiding this comment

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

LGTM. Great work.

@bergeron bergeron merged commit b1f5475 into main Oct 10, 2024
116 checks passed
@bergeron bergeron deleted the brian/polling-controllers branch October 10, 2024 15:24
@bergeron bergeron mentioned this pull request Oct 17, 2024
bergeron added a commit that referenced this pull request Oct 21, 2024
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]>
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 26, 2024
## **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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 26, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 27, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 27, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 27, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 27, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 27, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 27, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 29, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Nov 29, 2024
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]>
DDDDDanica pushed a commit to MetaMask/metamask-extension that referenced this pull request Dec 2, 2024
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]>
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.

5 participants