Skip to content

Commit

Permalink
migrate all selectedAddress methods
Browse files Browse the repository at this point in the history
  • Loading branch information
owencraston committed Mar 1, 2024
1 parent 89e9f81 commit c2c4f60
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ class Engine {
onPreferencesStateChange: (listener) =>
preferencesController.subscribe(listener),
getIdentities: () => preferencesController.state.identities,
getSelectedAddress: () => preferencesController.state.selectedAddress,
getSelectedAddress: () => accountsController.getSelectedAccount().address,
getMultiAccountBalancesEnabled: () =>
preferencesController.state.isMultiAccountBalancesEnabled,
getCurrentChainId: () =>
Expand Down Expand Up @@ -1065,7 +1065,8 @@ class Engine {
{
onTokensStateChange: (listener) =>
tokensController.subscribe(listener),
getSelectedAddress: () => preferencesController.state.selectedAddress,
getSelectedAddress: () =>
accountsController.getSelectedAccount().address,
getERC20BalanceOf: assetsContractController.getERC20BalanceOf.bind(
assetsContractController,
),
Expand Down Expand Up @@ -1102,7 +1103,8 @@ class Engine {
networkController.getProviderAndBlockTracker().blockTracker,
getGasFeeEstimates: () => gasFeeController.fetchGasFeeEstimates(),
getNetworkState: () => networkController.state,
getSelectedAddress: () => preferencesController.state.selectedAddress,
getSelectedAddress: () =>
accountsController.getSelectedAccount().address,
incomingTransactions: {
apiKey: process.env.MM_ETHERSCAN_KEY,
isEnabled: () => {
Expand Down

0 comments on commit c2c4f60

Please sign in to comment.