-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: bump asset controllers to 39 + polling API #28025
Conversation
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. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/controller-utils@11.3.0 |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
…ask-extension into brian/asset-controller-39
Builds ready [04ea3d6]
Page Load Metrics (1938 ± 90 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [cf66072]
Page Load Metrics (1832 ± 79 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
@@ -16,9 +16,10 @@ const useCurrencyRatePolling = (networkClientId?: string) => { | |||
const selectedNetworkClientId = useSelector(getSelectedNetworkClientId); | |||
|
|||
usePolling({ | |||
startPollingByNetworkClientId: currencyRateStartPollingByNetworkClientId, | |||
startPolling: (input) => | |||
currencyRateStartPollingByNetworkClientId(input.networkClientId), |
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.
Can you help me understand why we aren't updating the action to also be currencyRateStartPolling
?
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.
in actions.ts i kept the function name currencyRateStartPollingByNetworkClientId
to minimize changes since it does still accept a network client id (for now)
Builds ready [b93a15d]
Page Load Metrics (1851 ± 57 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [b93a15d]
Page Load Metrics (1851 ± 57 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
Bumps the asset controllers to 39. In this version, the polling API has changed from
startPollingByNetworkClientId
to a more flexiblestartPolling
that can accept any input. TheusePolling
hook is modified to accommodate this.Related issues
Manual testing steps
Should be no noticeable changes. Currency rates should continue to be fetched. Try switching between chains with different native currencies like mainnet, polygon, bnb and verify the native token has fiat prices.
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist