Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): remove exit app buttons #2206

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion e2e/settings.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ d('Settings', () => {
}

await element(by.id('TriggerRenderError')).tap();
await expect(element(by.id('ErrorClose'))).toBeVisible();
await expect(element(by.id('ErrorReport'))).toBeVisible();

markComplete('settings-dev');
Expand Down
6 changes: 0 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,6 @@ PODS:
- React-Core
- RNDeviceInfo (11.1.0):
- React-Core
- RNExitApp (2.0.0):
- React-Core
- RNFS (2.20.0):
- React-Core
- RNGestureHandler (2.15.0):
Expand Down Expand Up @@ -1565,7 +1563,6 @@ DEPENDENCIES:
- ReactNativeCameraKit (from `../node_modules/react-native-camera-kit`)
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNExitApp (from `../node_modules/react-native-exit-app`)
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- "RNKeychain (from `../node_modules/@synonymdev/react-native-keychain`)"
Expand Down Expand Up @@ -1738,8 +1735,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-clipboard/clipboard"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNExitApp:
:path: "../node_modules/react-native-exit-app"
RNFS:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
Expand Down Expand Up @@ -1850,7 +1845,6 @@ SPEC CHECKSUMS:
ReactNativeCameraKit: 71343efc1256720184ce980f164c7eedb78d5c16
RNCClipboard: 0a720adef5ec193aa0e3de24c3977222c7e52a37
RNDeviceInfo: b899ce37a403a4dea52b7cb85e16e49c04a5b88e
RNExitApp: 00036cabe7bacbb413d276d5520bf74ba39afa6a
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: 9b113eb9b7a4cbe66e1dbf4d9914281863ee0703
RNKeychain: 35f92386e7f8548e3e60e7441121afbe8c62d8e4
Expand Down
108 changes: 54 additions & 54 deletions ios/bitkit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"react-native-device-info": "11.1.0",
"react-native-dotenv": "3.4.11",
"react-native-draggable-flatlist": "4.0.1",
"react-native-exit-app": "2.0.0",
"react-native-fetch-api": "3.0.0",
"react-native-fs": "2.20.0",
"react-native-gesture-handler": "2.15.0",
Expand Down
16 changes: 0 additions & 16 deletions src/screens/AppError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Image,
Platform,
} from 'react-native';
import RNExitApp from 'react-native-exit-app';
import { SafeAreaProvider } from 'react-native-safe-area-context';

import SafeAreaInset from '../components/SafeAreaInset';
Expand All @@ -20,10 +19,6 @@ const imageSrc = require('../assets/illustrations/cross.png');
type ReactError = Error & ErrorInfo;

const AppError = ({ error }: { error: ReactError }): ReactElement => {
const onClose = (): void => {
RNExitApp.exitApp();
};

const onSend = async (): Promise<void> => {
const message = `Error: ${error.message}
\nComponent Stack: ${error.componentStack}
Expand Down Expand Up @@ -62,13 +57,6 @@ const AppError = ({ error }: { error: ReactError }): ReactElement => {
</View>

<View style={styles.buttonContainer}>
<TouchableOpacity
style={[styles.button, styles.buttonSecondary]}
activeOpacity={0.7}
testID="ErrorClose"
onPress={onClose}>
<Text style={styles.buttonText}>Close Bitkit</Text>
</TouchableOpacity>
<TouchableOpacity
style={[styles.button, styles.buttonPrimary]}
activeOpacity={0.7}
Expand Down Expand Up @@ -157,10 +145,6 @@ const styles = StyleSheet.create({
buttonPrimary: {
backgroundColor: 'rgba(255, 255, 255, 0.08)',
},
buttonSecondary: {
borderColor: 'rgba(255, 255, 255, 0.08)',
borderWidth: 2,
},
buttonText: {
color: 'white',
fontSize: 15,
Expand Down
17 changes: 0 additions & 17 deletions src/screens/Recovery/Recovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { StyleSheet, View } from 'react-native';
import { useAppSelector } from '../../hooks/redux';
import Share from 'react-native-share';
import { useTranslation } from 'react-i18next';
import RNExitApp from 'react-native-exit-app';

import { wipeApp } from '../../store/utils/settings';
import { openURL } from '../../utils/helpers';
Expand Down Expand Up @@ -96,10 +95,6 @@ const Recovery = ({
setShowWipeDialog(false);
};

const onCloseApp = (): void => {
RNExitApp.exitApp();
};

return (
<ThemedView style={styles.root}>
<SafeAreaInset type="top" />
Expand Down Expand Up @@ -141,15 +136,6 @@ const Recovery = ({
onPress={onWipeApp}
/>
</View>

<View style={styles.footer}>
<Button
text={t('close_app')}
size="large"
disabled={locked}
onPress={onCloseApp}
/>
</View>
</View>

<Dialog
Expand Down Expand Up @@ -179,9 +165,6 @@ const styles = StyleSheet.create({
button: {
marginBottom: 16,
},
footer: {
marginTop: 'auto',
},
});

export default Recovery;
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6387,7 +6387,6 @@ __metadata:
react-native-device-info: 11.1.0
react-native-dotenv: 3.4.11
react-native-draggable-flatlist: 4.0.1
react-native-exit-app: 2.0.0
react-native-fetch-api: 3.0.0
react-native-fs: 2.20.0
react-native-gesture-handler: 2.15.0
Expand Down Expand Up @@ -14026,13 +14025,6 @@ __metadata:
languageName: node
linkType: hard

"react-native-exit-app@npm:2.0.0":
version: 2.0.0
resolution: "react-native-exit-app@npm:2.0.0"
checksum: d455ddd3a688625ec0521c0260a709e9e1dedaa7ef5bdebc76b87017056950f79366e2b4686f864c8127555a5359b6bfc5b2636477f99f86ad1920ea1d87360e
languageName: node
linkType: hard

"react-native-fetch-api@npm:3.0.0":
version: 3.0.0
resolution: "react-native-fetch-api@npm:3.0.0"
Expand Down
Loading