Page MenuHomePhabricator

D14164.diff
No OneTemporary

D14164.diff

diff --git a/native/account/registration/siwe-backup-message-creation.react.js b/native/account/registration/siwe-backup-message-creation.react.js
--- a/native/account/registration/siwe-backup-message-creation.react.js
+++ b/native/account/registration/siwe-backup-message-creation.react.js
@@ -24,6 +24,7 @@
} from '../../navigation/route-names.js';
import { useStyles } from '../../themes/colors.js';
import Alert from '../../utils/alert.js';
+import PromptButton from '../prompt-button.react.js';
import { useSIWEPanelState } from '../siwe-hooks.js';
import SIWEPanel from '../siwe-panel.react.js';
@@ -243,7 +244,6 @@
siweNonce,
siweStatement,
onSuccessfulWalletSignature,
- onSkip,
} = props;
const siweSignatureRequestData = React.useMemo(
() => ({
@@ -283,12 +283,13 @@
</View>
</RegistrationContentContainer>
<RegistrationButtonContainer>
- <PrimaryButton
- onPress={openPanel}
- label="Decrypt with Ethereum signature"
- variant="enabled"
- />
- <PrimaryButton onPress={onSkip} label="Skip" variant="outline" />
+ <View style={styles.buttonContainer}>
+ <PromptButton
+ onPress={openPanel}
+ text="Decrypt with Ethereum signature"
+ variant={panelState === 'opening' ? 'loading' : 'enabled'}
+ />
+ </View>
</RegistrationButtonContainer>
</RegistrationContainer>
{siwePanel}
@@ -320,6 +321,9 @@
alignItems: 'center',
justifyContent: 'center',
},
+ buttonContainer: {
+ flexDirection: 'row',
+ },
};
export {
diff --git a/native/account/sign-in-navigator.react.js b/native/account/sign-in-navigator.react.js
--- a/native/account/sign-in-navigator.react.js
+++ b/native/account/sign-in-navigator.react.js
@@ -11,6 +11,7 @@
import RestoreBackupScreen from './restore-backup-screen.react.js';
import RestorePasswordAccountScreen from './restore-password-account-screen.react.js';
import RestorePromptScreen from './restore-prompt-screen.react.js';
+import RestoreSIWEBackup from '../backup/restore-siwe-backup.react.js';
import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
import {
type ScreenParamList,
@@ -19,6 +20,7 @@
RestorePromptScreenRouteName,
RestorePasswordAccountScreenRouteName,
RestoreBackupScreenRouteName,
+ RestoreSIWEBackupRouteName,
} from '../navigation/route-names.js';
import { useColors } from '../themes/colors.js';
@@ -71,6 +73,10 @@
name={RestoreBackupScreenRouteName}
component={RestoreBackupScreen}
/>
+ <SignInStack.Screen
+ name={RestoreSIWEBackupRouteName}
+ component={RestoreSIWEBackup}
+ />
</SignInStack.Navigator>
);
}
diff --git a/native/backup/restore-siwe-backup.react.js b/native/backup/restore-siwe-backup.react.js
--- a/native/backup/restore-siwe-backup.react.js
+++ b/native/backup/restore-siwe-backup.react.js
@@ -2,7 +2,6 @@
import * as React from 'react';
import { Alert } from 'react-native';
-import { SafeAreaView } from 'react-native-safe-area-context';
import { type SIWEResult } from 'lib/types/siwe-types.js';
import { getMessageForException } from 'lib/utils/errors.js';
@@ -13,7 +12,6 @@
import { type RootNavigationProp } from '../navigation/root-navigator.react.js';
import { type NavigationRoute } from '../navigation/route-names.js';
import { persistConfig } from '../redux/persist.js';
-import { useStyles } from '../themes/colors.js';
export type RestoreSIWEBackupParams = {
+backupID: string,
@@ -29,7 +27,6 @@
};
function RestoreSIWEBackup(props: Props): React.Node {
- const styles = useStyles(unboundStyles);
const { goBack } = props.navigation;
const { route } = props;
const {
@@ -75,25 +72,14 @@
);
return (
- <SafeAreaView edges={safeAreaEdges} style={styles.container}>
- <SignSIWEBackupMessageForRestore
- siweNonce={siweNonce}
- siweStatement={siweStatement}
- siweIssuedAt={siweIssuedAt}
- onSkip={goBack}
- onSuccessfulWalletSignature={onSuccessfulWalletSignature}
- />
- </SafeAreaView>
+ <SignSIWEBackupMessageForRestore
+ siweNonce={siweNonce}
+ siweStatement={siweStatement}
+ siweIssuedAt={siweIssuedAt}
+ onSkip={goBack}
+ onSuccessfulWalletSignature={onSuccessfulWalletSignature}
+ />
);
}
-const safeAreaEdges = ['top'];
-const unboundStyles = {
- container: {
- flex: 1,
- backgroundColor: 'panelBackground',
- justifyContent: 'space-between',
- },
-};
-
export default RestoreSIWEBackup;
diff --git a/native/navigation/root-navigator.react.js b/native/navigation/root-navigator.react.js
--- a/native/navigation/root-navigator.react.js
+++ b/native/navigation/root-navigator.react.js
@@ -55,7 +55,6 @@
ConnectFarcasterBottomSheetRouteName,
TagFarcasterChannelNavigatorRouteName,
CreateMissingSIWEBackupMessageRouteName,
- RestoreSIWEBackupRouteName,
LinkedDevicesBottomSheetRouteName,
QRAuthNavigatorRouteName,
} from './route-names.js';
@@ -65,7 +64,6 @@
import RegistrationNavigator from '../account/registration/registration-navigator.react.js';
import SignInNavigator from '../account/sign-in-navigator.react.js';
import TermsAndPrivacyModal from '../account/terms-and-privacy-modal.react.js';
-import RestoreSIWEBackup from '../backup/restore-siwe-backup.react.js';
import ThreadPickerModal from '../calendar/thread-picker-modal.react.js';
import ImagePasteModal from '../chat/image-paste-modal.react.js';
import MessageReactionsModal from '../chat/message-reactions-modal.react.js';
@@ -314,10 +312,6 @@
name={CreateMissingSIWEBackupMessageRouteName}
component={CreateMissingSIWEBackupMessage}
/>
- <Root.Screen
- name={RestoreSIWEBackupRouteName}
- component={RestoreSIWEBackup}
- />
<Root.Screen
name={QRAuthNavigatorRouteName}
component={QRAuthNavigator}
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -213,7 +213,6 @@
+ConnectFarcasterBottomSheet: void,
+TagFarcasterChannelNavigator: void,
+CreateMissingSIWEBackupMessage: void,
- +RestoreSIWEBackup: RestoreSIWEBackupParams,
+QRAuthNavigator: void,
};
@@ -350,6 +349,7 @@
+RestorePromptScreen: void,
+RestorePasswordAccountScreen: void,
+RestoreBackupScreen: RestoreBackupScreenParams,
+ +RestoreSIWEBackup: RestoreSIWEBackupParams,
};
export type UserProfileBottomSheetParamList = {

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 8:57 PM (5 m, 25 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2692642
Default Alt Text
D14164.diff (6 KB)

Event Timeline