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) {
120
120
( ) => isEmailPasswordLessLoginVisible || isSmsPasswordLessLoginVisible ,
121
121
[ isEmailPasswordLessLoginVisible , isSmsPasswordLessLoginVisible ]
122
122
) ;
123
- const showExternalWalletButton = useMemo ( ( ) => modalState . hasExternalWallets , [ modalState ] ) ;
123
+ const showExternalWalletButton = useMemo (
124
+ ( ) => modalState . hasExternalWallets || ! ! modalState . externalWalletsConfig [ WALLET_CONNECTORS . METAMASK ] ,
125
+ [ modalState ]
126
+ ) ;
124
127
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 ]
127
132
) ;
128
133
129
134
const handleExternalWalletBtnClick = ( flag : boolean ) => {
Original file line number Diff line number Diff line change @@ -297,11 +297,12 @@ export class LoginModal {
297
297
options ?: { externalWalletsInitialized : boolean ; externalWalletsVisibility : boolean ; showExternalWalletsOnly : boolean }
298
298
) : void => {
299
299
this . externalWalletsConfig = externalWalletsConfig ;
300
+ const isMMAvailable = ! ! externalWalletsConfig [ WALLET_CONNECTORS . METAMASK ] ;
300
301
this . setState ( {
301
302
externalWalletsConfig,
302
303
externalWalletsInitialized : ! ! options . externalWalletsInitialized ,
303
304
showExternalWalletsOnly : ! ! options . showExternalWalletsOnly ,
304
- externalWalletsVisibility : ! ! options . externalWalletsVisibility ,
305
+ externalWalletsVisibility : isMMAvailable ? false : ! ! options . externalWalletsVisibility ,
305
306
} ) ;
306
307
} ;
307
308
You can’t perform that action at this time.
0 commit comments