Skip to content

Commit 41a2b7f

Browse files
committed
more
1 parent 946e4d1 commit 41a2b7f

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

ui/selectors/multichain/networks.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -198,18 +198,21 @@ export const getMultichainNetworkConfigurationsByChainId =
198198
// There's a fallback for EVM network names/nicknames, in case the network
199199
// does not have a name/nickname the fallback is the first rpc endpoint url.
200200
// TODO: Update toMultichainNetworkConfigurationsByChainId to handle this case.
201-
const evmNetworks = Object.entries(networkConfigurationsByChainId).reduce(
202-
(acc, [, network]) => ({
203-
...acc,
204-
[toEvmCaipChainId(network.chainId)]: {
205-
...toMultichainNetworkConfiguration(network),
206-
name:
207-
network.name ||
208-
network.rpcEndpoints[network.defaultRpcEndpointIndex].url,
209-
},
210-
}),
211-
{},
212-
);
201+
const evmNetworks: Record<
202+
CaipChainId,
203+
InternalMultichainNetworkConfiguration
204+
> = {};
205+
206+
for (const [, network] of Object.entries(
207+
networkConfigurationsByChainId,
208+
)) {
209+
evmNetworks[toEvmCaipChainId(network.chainId)] = {
210+
...toMultichainNetworkConfiguration(network),
211+
name:
212+
network.name ||
213+
network.rpcEndpoints[network.defaultRpcEndpointIndex].url,
214+
};
215+
}
213216

214217
const networks = {
215218
///: BEGIN:ONLY_INCLUDE_IF(multichain)

ui/selectors/selectors.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,8 @@ export const getMetaMaskAccounts = createDeepEqualSelector(
497497
};
498498
}
499499

500-
return {
501-
...accounts,
502-
[internalAccount.address]: account,
503-
};
500+
accounts[internalAccount.address] = account;
501+
return accounts;
504502
}, {}),
505503
);
506504
/**

0 commit comments

Comments
 (0)