@@ -11,6 +11,7 @@ import {
1111 ANALYTICS_SDK_TYPE ,
1212 AuthLoginParams ,
1313 AUTHORIZED_EVENT_DATA ,
14+ CAN_AUTHORIZE_STATUSES ,
1415 CHAIN_NAMESPACES ,
1516 type ChainNamespaceType ,
1617 type CONNECTED_EVENT_DATA ,
@@ -441,7 +442,7 @@ export class Web3AuthNoModal extends SafeEventEmitter<Web3AuthNoModalEvents> imp
441442
442443 async getUserInfo ( ) : Promise < Partial < UserInfo > > {
443444 log . debug ( "Getting user info" , this . status , this . connectedConnector ?. name ) ;
444- if ( ! CONNECTED_STATUSES . includes ( this . status ) || ! this . connectedConnector ) throw WalletLoginError . notConnectedError ( `No wallet is connected` ) ;
445+ if ( ! CAN_AUTHORIZE_STATUSES . includes ( this . status ) || ! this . connectedConnector ) throw WalletLoginError . notConnectedError ( `No wallet is connected` ) ;
445446 return this . connectedConnector . getUserInfo ( ) ;
446447 }
447448
@@ -484,8 +485,7 @@ export class Web3AuthNoModal extends SafeEventEmitter<Web3AuthNoModalEvents> imp
484485 }
485486
486487 async getIdentityToken ( ) : Promise < IdentityTokenInfo > {
487- if ( ! [ ...CONNECTED_STATUSES , CONNECTOR_STATUS . AUTHORIZING ] . includes ( this . status ) || ! this . connectedConnector )
488- throw WalletLoginError . notConnectedError ( `No wallet is connected` ) ;
488+ if ( ! CAN_AUTHORIZE_STATUSES . includes ( this . status ) || ! this . connectedConnector ) throw WalletLoginError . notConnectedError ( `No wallet is connected` ) ;
489489
490490 const trackData = { connector : this . connectedConnector . name } ;
491491 try {
@@ -891,7 +891,7 @@ export class Web3AuthNoModal extends SafeEventEmitter<Web3AuthNoModalEvents> imp
891891
892892 this . status = CONNECTOR_STATUS . CONNECTED ;
893893 log . debug ( "connected" , this . status , this . connectedConnectorName ) ;
894- this . connectToPlugins ( { connector : data . connector as WALLET_CONNECTOR_TYPE } ) ;
894+ this . connectToPlugins ( { ... data , connector : data . connector as WALLET_CONNECTOR_TYPE } ) ;
895895 this . emit ( CONNECTOR_EVENTS . CONNECTED , { ...data , loginMode : this . loginMode } ) ;
896896 } ) ;
897897
0 commit comments