@@ -63,7 +63,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
6363
6464 public async initModal ( params ?: ModalConfigParams ) : Promise < void > {
6565 super . checkInitRequirements ( ) ;
66-
66+ super . initCachedConnectorAndChainId ( ) ;
6767 // get project config and wallet registry
6868 const { projectConfig, walletRegistry } = await this . getProjectAndWalletConfig ( params ) ;
6969 this . options . uiConfig = deepmerge ( cloneDeep ( projectConfig . whitelabel || { } ) , this . options . uiConfig || { } ) ;
@@ -81,10 +81,12 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
8181 await this . loginModal . initModal ( ) ;
8282
8383 // setup common JRPC provider
84- await this . setupCommonJRPCProvider ( projectConfig ) ;
84+ await this . setupCommonJRPCProvider ( ) ;
8585
8686 // initialize connectors
87- this . on ( CONNECTOR_EVENTS . CONNECTORS_UPDATED , ( { connectors } ) => this . initConnectors ( { connectors, projectConfig, modalConfig : params } ) ) ;
87+ this . on ( CONNECTOR_EVENTS . CONNECTORS_UPDATED , ( { connectors : newConnectors } ) =>
88+ this . initConnectors ( { connectors : newConnectors , projectConfig, modalConfig : params } )
89+ ) ;
8890 await this . loadConnectors ( { projectConfig } ) ;
8991
9092 // initialize plugins
@@ -172,6 +174,7 @@ export class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
172174 // update auth connector config
173175 const { sms_otp_enabled : smsOtpEnabled } = projectConfig ;
174176 if ( smsOtpEnabled !== undefined ) {
177+ // TODO: use the new login config method
175178 const connectorConfig : Record < WALLET_CONNECTOR_TYPE , ModalConfig > = {
176179 [ WALLET_CONNECTORS . AUTH ] : {
177180 label : WALLET_CONNECTORS . AUTH ,
0 commit comments