@@ -62,7 +62,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
6262
6363 public async initModal ( params ?: ModalConfigParams ) : Promise < void > {
6464 super . checkInitRequirements ( ) ;
65-
65+ super . initCachedConnectorAndChainId ( ) ;
6666 // get project config and wallet registry
6767 const { projectConfig, walletRegistry } = await this . getProjectAndWalletConfig ( params ) ;
6868 this . options . uiConfig = deepmerge ( cloneDeep ( projectConfig . whitelabel || { } ) , this . options . uiConfig || { } ) ;
@@ -80,10 +80,12 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
8080 await this . loginModal . initModal ( ) ;
8181
8282 // setup common JRPC provider
83- await this . setupCommonJRPCProvider ( projectConfig ) ;
83+ await this . setupCommonJRPCProvider ( ) ;
8484
8585 // initialize connectors
86- this . on ( CONNECTOR_EVENTS . CONNECTORS_UPDATED , ( { connectors } ) => this . initConnectors ( { connectors, projectConfig, modalConfig : params } ) ) ;
86+ this . on ( CONNECTOR_EVENTS . CONNECTORS_UPDATED , ( { connectors : newConnectors } ) =>
87+ this . initConnectors ( { connectors : newConnectors , projectConfig, modalConfig : params } )
88+ ) ;
8789 await this . loadConnectors ( { projectConfig } ) ;
8890
8991 // initialize plugins
@@ -171,6 +173,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
171173 // update auth connector config
172174 const { sms_otp_enabled : smsOtpEnabled } = projectConfig ;
173175 if ( smsOtpEnabled !== undefined ) {
176+ // TODO: use the new login config method
174177 const connectorConfig : Record < WALLET_CONNECTOR_TYPE , ModalConfig > = {
175178 [ WALLET_CONNECTORS . AUTH ] : {
176179 label : WALLET_CONNECTORS . AUTH ,
0 commit comments