Page MenuHomePhabricator

D13906.id46296.diff
No OneTemporary

D13906.id46296.diff

diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -27,7 +27,10 @@
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
import { recoveryFromReduxActionSources } from 'lib/types/account-types.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
-import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
+import {
+ usingCommServicesAccessToken,
+ usingRestoreFlow,
+} from 'lib/utils/services-utils.js';
import { splashBackgroundURI } from './background-info.js';
import FullscreenSIWEPanel from './fullscreen-siwe-panel.react.js';
@@ -496,17 +499,20 @@
}
const signInButtons = [];
- signInButtons.push(
- <TouchableOpacity
- onPress={onPressLogIn}
- style={classicAuthButtonStyle}
- activeOpacity={0.6}
- key="login-form"
- >
- <Text style={classicAuthButtonTextStyle}>Sign in</Text>
- </TouchableOpacity>,
- );
- if (__DEV__) {
+ if (!usingRestoreFlow) {
+ signInButtons.push(
+ <TouchableOpacity
+ onPress={onPressLogIn}
+ style={classicAuthButtonStyle}
+ activeOpacity={0.6}
+ key="login-form"
+ >
+ <Text style={classicAuthButtonTextStyle}>Sign in</Text>
+ </TouchableOpacity>,
+ );
+ }
+ if (__DEV__ || usingRestoreFlow) {
+ const buttonText = usingRestoreFlow ? 'Sign in' : 'Sign in (QR)';
signInButtons.push(
<TouchableOpacity
onPress={onPressQRCodeSignIn}
@@ -514,29 +520,38 @@
activeOpacity={0.6}
key="qr-code-login"
>
- <Text style={classicAuthButtonTextStyle}>Sign in (QR)</Text>
+ <Text style={classicAuthButtonTextStyle}>{buttonText}</Text>
</TouchableOpacity>,
);
}
+ let siweSection = null;
+ if (!usingRestoreFlow) {
+ siweSection = (
+ <>
+ <TouchableOpacity
+ onPress={onPressSIWE}
+ style={siweAuthButtonStyle}
+ activeOpacity={0.6}
+ >
+ <View style={styles.siweIcon}>
+ <EthereumLogo />
+ </View>
+ <Text style={siweAuthButtonTextStyle}>Sign in with Ethereum</Text>
+ </TouchableOpacity>
+ <View style={styles.siweOr}>
+ <View style={styles.siweOrLeftHR} />
+ <Text style={styles.siweOrText}>or</Text>
+ <View style={styles.siweOrRightHR} />
+ </View>
+ </>
+ );
+ }
+
return (
<AnimatedView style={buttonsViewStyle}>
<LoggedOutStaffInfo />
- <TouchableOpacity
- onPress={onPressSIWE}
- style={siweAuthButtonStyle}
- activeOpacity={0.6}
- >
- <View style={styles.siweIcon}>
- <EthereumLogo />
- </View>
- <Text style={siweAuthButtonTextStyle}>Sign in with Ethereum</Text>
- </TouchableOpacity>
- <View style={styles.siweOr}>
- <View style={styles.siweOrLeftHR} />
- <Text style={styles.siweOrText}>or</Text>
- <View style={styles.siweOrRightHR} />
- </View>
+ {siweSection}
<View style={styles.signInButtons}>{signInButtons}</View>
<View style={styles.registerButtons}>
<TouchableOpacity

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 4:24 AM (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698308
Default Alt Text
D13906.id46296.diff (3 KB)

Event Timeline