File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,15 @@ function Widget(props: WidgetProps) {
120120 ( ) => isEmailPasswordLessLoginVisible || isSmsPasswordLessLoginVisible ,
121121 [ isEmailPasswordLessLoginVisible , isSmsPasswordLessLoginVisible ]
122122 ) ;
123- const showExternalWalletButton = useMemo ( ( ) => modalState . hasExternalWallets , [ modalState ] ) ;
123+ const showExternalWalletButton = useMemo (
124+ ( ) => modalState . hasExternalWallets || ! ! modalState . externalWalletsConfig [ WALLET_CONNECTORS . METAMASK ] ,
125+ [ modalState ]
126+ ) ;
124127 const showExternalWalletPage = useMemo (
125- ( ) => ( areSocialLoginsVisible || showPasswordLessInput ) && ! modalState . externalWalletsVisibility ,
126- [ areSocialLoginsVisible , showPasswordLessInput , modalState . externalWalletsVisibility ]
128+ ( ) =>
129+ ( areSocialLoginsVisible || showPasswordLessInput || ! ! modalState . externalWalletsConfig [ WALLET_CONNECTORS . METAMASK ] ) &&
130+ ! modalState . externalWalletsVisibility ,
131+ [ areSocialLoginsVisible , showPasswordLessInput , modalState ]
127132 ) ;
128133
129134 const handleExternalWalletBtnClick = ( flag : boolean ) => {
Original file line number Diff line number Diff line change @@ -297,11 +297,12 @@ export class LoginModal {
297297 options ?: { externalWalletsInitialized : boolean ; externalWalletsVisibility : boolean ; showExternalWalletsOnly : boolean }
298298 ) : void => {
299299 this . externalWalletsConfig = externalWalletsConfig ;
300+ const isMMAvailable = ! ! externalWalletsConfig [ WALLET_CONNECTORS . METAMASK ] ;
300301 this . setState ( {
301302 externalWalletsConfig,
302303 externalWalletsInitialized : ! ! options . externalWalletsInitialized ,
303304 showExternalWalletsOnly : ! ! options . showExternalWalletsOnly ,
304- externalWalletsVisibility : ! ! options . externalWalletsVisibility ,
305+ externalWalletsVisibility : isMMAvailable ? false : ! ! options . externalWalletsVisibility ,
305306 } ) ;
306307 } ;
307308
You can’t perform that action at this time.
0 commit comments