File tree Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff 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/**
You can’t perform that action at this time.
0 commit comments