@@ -24,15 +24,7 @@ import deepmerge from "deepmerge";
2424
2525import { defaultConnectorsModalConfig , walletRegistryUrl } from "./config" ;
2626import { type ConnectorsModalConfig , type IWeb3AuthModal , type ModalConfig } from "./interface" ;
27- import {
28- AUTH_PROVIDERS ,
29- capitalizeFirstLetter ,
30- getConnectorSocialLogins ,
31- getUserLanguage ,
32- LOGIN_MODAL_EVENTS ,
33- LoginModal ,
34- type UIConfig ,
35- } from "./ui" ;
27+ import { AUTH_PROVIDERS , capitalizeFirstLetter , getUserLanguage , LOGIN_MODAL_EVENTS , LoginModal , type UIConfig } from "./ui" ;
3628
3729export interface Web3AuthOptions extends IWeb3AuthCoreOptions {
3830 /**
@@ -293,8 +285,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
293285 if ( connector . type !== CONNECTOR_CATEGORY . IN_APP ) return false ;
294286 if ( this . modalConfig . connectors ?. [ connector . name ] ?. showOnModal !== true ) return false ;
295287 if ( ! this . modalConfig . connectors ?. [ connector . name ] ?. loginMethods ) return true ;
296- const mergedLoginMethods = getConnectorSocialLogins ( connector . name , this . modalConfig . connectors [ connector . name ] ?. loginMethods ) ;
297- if ( Object . values ( mergedLoginMethods ) . some ( ( method : LoginMethodConfig [ keyof LoginMethodConfig ] ) => method . showOnModal ) ) return true ;
288+ if ( Object . values ( this . modalConfig . connectors [ connector . name ] . loginMethods ) . some ( ( method ) => method . showOnModal ) ) return true ;
298289 return false ;
299290 } ) ;
300291 log . debug ( hasInAppConnectors , this . connectors , connectorNames , "hasInAppWallets" ) ;
@@ -330,7 +321,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
330321 // adding it later if no in-app wallets are available.
331322 if ( connector . type === CONNECTOR_CATEGORY . IN_APP ) {
332323 log . info ( "connectorInitResults" , connectorName ) ;
333- const loginMethods = getConnectorSocialLogins ( connectorName , this . modalConfig . connectors [ connectorName ] ?. loginMethods ) ;
324+ const loginMethods = this . modalConfig . connectors [ connectorName ] ?. loginMethods || { } ;
334325 this . loginModal . addSocialLogins ( connectorName , loginMethods , this . options . uiConfig ?. loginMethodsOrder || AUTH_PROVIDERS , {
335326 ...this . options . uiConfig ,
336327 loginGridCol : this . options . uiConfig ?. loginGridCol || 3 ,
0 commit comments