@@ -35,6 +35,7 @@ export default function Hero({
35
35
walletLinked,
36
36
projects,
37
37
walletAuthUrl,
38
+ needsMfa,
38
39
} = useContext ( MetamaskProviderContext ) ;
39
40
40
41
const isMobile = sdk . platformManager ?. isMobile ?? false ;
@@ -100,7 +101,7 @@ export default function Hero({
100
101
className ,
101
102
) }
102
103
>
103
- { ( showInstallButton || ! ( metaMaskAccount ) ) && < EthIcon /> }
104
+ < EthIcon />
104
105
< Text as = "h1" >
105
106
< span >
106
107
{ network === "linea" && "Linea Sepolia" }
@@ -112,7 +113,7 @@ export default function Hero({
112
113
{ showInstallButton
113
114
? "Install MetaMask for your browser to get started and request ETH."
114
115
: ! Object . keys ( projects ) . length
115
- ? walletLinked === undefined
116
+ ? needsMfa ? "Your Infura Account requires 2-Factor Authentication" : walletLinked === undefined
116
117
? "Connect your MetaMask wallet to get started and request ETH."
117
118
: walletLinked === WALLET_LINK_TYPE . NO
118
119
? "Link your Infura account to get started and request ETH."
@@ -154,6 +155,15 @@ export default function Hero({
154
155
</ Button >
155
156
) : ! Object . keys ( projects ) . length ? (
156
157
< >
158
+ { needsMfa ?
159
+ < Button
160
+ testId = "hero-cta-enter-mfa"
161
+ className = { styles . button }
162
+ onClick = { ( ) => ( window . location . href = walletAuthUrl ) }
163
+ >
164
+ Authenticate
165
+ </ Button >
166
+ : < >
157
167
{ walletLinked === undefined && (
158
168
< Button
159
169
testId = "hero-cta-connect-metamask"
@@ -184,6 +194,8 @@ export default function Hero({
184
194
Select Infura Account
185
195
</ Button >
186
196
) }
197
+ </ >
198
+ }
187
199
</ >
188
200
) : (
189
201
< Button
0 commit comments