-
-
Notifications
You must be signed in to change notification settings - Fork 224
fix: improve multichainTokenBalances and multichainAssetsRates controller state updates #5761
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
base: main
Are you sure you want to change the base?
Conversation
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
664bfa2
to
acb593c
Compare
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
...es/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.ts
Outdated
Show resolved
Hide resolved
...es/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.ts
Outdated
Show resolved
Hide resolved
...es/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.ts
Outdated
Show resolved
Hide resolved
...es/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/MultichainAssetsController/MultichainAssetsController.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.ts
Show resolved
Hide resolved
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
...ges/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.test.ts
Outdated
Show resolved
Hide resolved
...ges/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.test.ts
Outdated
Show resolved
Hide resolved
...ges/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.test.ts
Outdated
Show resolved
Hide resolved
...ges/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.test.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.ts
Outdated
Show resolved
Hide resolved
packages/assets-controllers/src/MultichainAssetsController/MultichainAssetsController.ts
Outdated
Show resolved
Hide resolved
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
...ges/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.test.ts
Show resolved
Hide resolved
packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.ts
Outdated
Show resolved
Hide resolved
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! Thanks for making all those changes 😄
packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.ts
Show resolved
Hide resolved
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
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
Explanation
Both
MultichainTokenBalancesController
andMultichainAssetsRatesController
used to subscribe toMultichainAssetsController:stateChange
which was triggering state updates for all existing accounts on every update.Instead; MultichainAssetsController will now publish new event
MultichainAssetsController:newAccountAssets
that is published whenever new assets are added for specific accounts, and controllers can subscribe to that instead.References
Changelog
Checklist