@@ -278,7 +278,7 @@ function Root(props: RootProps) {
278278 [ connectorVisibilityMap , chainNamespaces , config , deviceDetails . platform , isWalletConnectConnectorIncluded ]
279279 ) ;
280280
281- const allButtons = useMemo ( ( ) => {
281+ const allRegistryButtons = useMemo ( ( ) => {
282282 return [ ...generateWalletButtons ( walletRegistry . default ) , ...generateWalletButtons ( walletRegistry . others ) ] ;
283283 } , [ generateWalletButtons , walletRegistry . default , walletRegistry . others ] ) ;
284284
@@ -303,7 +303,7 @@ function Root(props: RootProps) {
303303 const metamaskConnectorIdx = installedConnectors . findIndex ( ( x ) => x . name === WALLET_CONNECTORS . METAMASK && ! x . hasInjectedWallet ) ;
304304 if ( metamaskConnectorIdx !== - 1 ) {
305305 const metamaskConnector = installedConnectors [ metamaskConnectorIdx ] ;
306- let metamaskRegistryButton = allButtons . find ( ( button ) => button . name === WALLET_CONNECTORS . METAMASK ) ;
306+ let metamaskRegistryButton = allRegistryButtons . find ( ( button ) => button . name === WALLET_CONNECTORS . METAMASK ) ;
307307 if ( ! metamaskRegistryButton ) {
308308 // use the default metamask registry item if it's not in the registry
309309 metamaskRegistryButton = generateWalletButtons ( {
@@ -321,7 +321,7 @@ function Root(props: RootProps) {
321321
322322 // make metamask the first button and limit the number of buttons
323323 return installedConnectors ;
324- } , [ allButtons , config , connectorVisibilityMap , generateWalletButtons ] ) ;
324+ } , [ allRegistryButtons , config , connectorVisibilityMap , generateWalletButtons ] ) ;
325325
326326 const customConnectorButtons = useMemo ( ( ) => {
327327 return installedConnectorButtons . filter ( ( button ) => ! button . hasInjectedWallet ) ;
@@ -338,12 +338,12 @@ function Root(props: RootProps) {
338338
339339 const totalExternalWallets = useMemo ( ( ) => {
340340 const uniqueWalletSet = new Set ( ) ;
341- return allButtons . concat ( installedConnectorButtons ) . filter ( ( button ) => {
341+ return allRegistryButtons . concat ( installedConnectorButtons ) . filter ( ( button ) => {
342342 if ( uniqueWalletSet . has ( button . name ) ) return false ;
343343 uniqueWalletSet . add ( button . name ) ;
344344 return true ;
345345 } ) . length ;
346- } , [ allButtons , installedConnectorButtons ] ) ;
346+ } , [ allRegistryButtons , installedConnectorButtons ] ) ;
347347
348348 const handleSocialLoginHeight = ( ) => {
349349 setIsSocialLoginsExpanded ( ( prev ) => ! prev ) ;
@@ -499,7 +499,7 @@ function Root(props: RootProps) {
499499 metamaskConnectUri = { modalState . metamaskConnectUri }
500500 config = { modalState . externalWalletsConfig }
501501 walletRegistry = { walletRegistry }
502- allExternalButtons = { allButtons }
502+ allRegistryButtons = { allRegistryButtons }
503503 connectorVisibilityMap = { connectorVisibilityMap }
504504 customConnectorButtons = { customConnectorButtons }
505505 deviceDetails = { deviceDetails }
0 commit comments