Repository navigation
feat: changes to AccountTrackerController to enable migration in extension - #6938
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. |
63ea58a to
561d671
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. |
| tokenBalances: { | ||
| '0x0000000000000000000000000000000000000000': { | ||
| [CHECKSUM_ADDRESS_1]: new BN('123456', 16), | ||
| [ADDRESS_1]: new BN('123456', 16), |
There was a problem hiding this comment.
@salimtb I'd like your input here if possible.
From what I can see, if we use multicall (queryAllAccounts: true), the resulting addresses will be lowercase, but when we query a single address (queryAllAccounts: false) the result is a checksummed address.
Therefore, since I have changed the these two events to query multiple accounts (both the from and the to), I had to change this return value from the test.
Does that sound right?
|
@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. |
| | { | ||
| type: 'PreferencesController:getState'; | ||
| handler: () => { isMultiAccountBalancesEnabled: boolean }; | ||
| } |
There was a problem hiding this comment.
This fixes type issues in clients, as the extension PreferencesController state is not compatible with core. We only care about isMultiAccountBalancesEnabled.
|
@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. |
Explanation
Adds optional callback to disable fetching balances in AccountTrackerController.
Attempts to refresh balance when a network is added and when the keyring is unlocked.
References
Checklist
Note
Adds optional fetchingEnabled gate, refreshes on networkAdded/unlock, and updates tx handlers to refresh both from/to addresses via new refreshAddresses; updates tests and changelog with breaking notes.
fetchingEnabledconstructor callback;refreshshort-circuits when disabled.NetworkController:networkAddedandKeyringController:unlockto trigger balance refreshes.fromandtovia newrefreshAddresses; remove single-address refresh path.PreferencesController:getStatetyping; remove legacyAccountsController:selectedAccountChangereference.networkAdded,unlock, and disabled fetching; address checksum fixes.fetchingEnabledoption.Written by Cursor Bugbot for commit 878ed7e. This will update automatically on new commits. Configure here.