mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 07:15:35 +01:00
FIX: Failing to open Camera Screen when Scanning to Import (iOS) #5831
This commit is contained in:
parent
294790bc4a
commit
6e9fb487e0
3 changed files with 24 additions and 14 deletions
|
@ -562,6 +562,7 @@ const Navigation = () => {
|
|||
presentation: isDesktop ? 'containedModal' : 'fullScreenModal',
|
||||
statusBarHidden: true,
|
||||
}}
|
||||
initialParams={ScanQRCode.initialParams}
|
||||
/>
|
||||
|
||||
<RootStack.Screen name="PaymentCodeRoot" component={PaymentCodeStackRoot} options={NavigationDefaultOptions} />
|
||||
|
|
|
@ -86,8 +86,7 @@ const ScanQRCode = () => {
|
|||
const [isLoading, setIsLoading] = useState(false);
|
||||
const navigation = useNavigation();
|
||||
const route = useRoute();
|
||||
const showFileImportButton = route.params.showFileImportButton || false;
|
||||
const { launchedBy, onBarScanned, onDismiss, onBarScannerDismissWithoutData = () => {} } = route.params;
|
||||
const { launchedBy, onBarScanned, onDismiss, showFileImportButton, onBarScannerDismissWithoutData = () => {} } = route.params;
|
||||
const scannedCache = {};
|
||||
const { colors } = useTheme();
|
||||
const isFocused = useIsFocused();
|
||||
|
@ -404,3 +403,14 @@ const ScanQRCode = () => {
|
|||
};
|
||||
|
||||
export default ScanQRCode;
|
||||
ScanQRCode.initialParams = {
|
||||
isLoading: false,
|
||||
cameraStatusGranted: undefined,
|
||||
backdoorPressed: undefined,
|
||||
launchedBy: undefined,
|
||||
urTotal: undefined,
|
||||
urHave: undefined,
|
||||
backdoorText: '',
|
||||
backdoorVisible: false,
|
||||
animatedQRCodeData: {},
|
||||
}
|
|
@ -3,6 +3,7 @@ import {
|
|||
ActivityIndicator,
|
||||
FlatList,
|
||||
I18nManager,
|
||||
InteractionManager,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
LayoutAnimation,
|
||||
|
@ -461,17 +462,15 @@ const WalletsAddMultisigStep2 = () => {
|
|||
fs.showActionSheet({ anchor: findNodeHandle(openScannerButton.current) }).then(onBarScanned);
|
||||
} else {
|
||||
setIsProvideMnemonicsModalVisible(false);
|
||||
setTimeout(() =>
|
||||
requestCameraAuthorization().then(
|
||||
() =>
|
||||
navigation.navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
onBarScanned,
|
||||
showFileImportButton: true,
|
||||
},
|
||||
}),
|
||||
650,
|
||||
InteractionManager.runAfterInteractions(() =>
|
||||
requestCameraAuthorization().then(() =>
|
||||
navigation.navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
onBarScanned,
|
||||
showFileImportButton: true,
|
||||
},
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -795,7 +794,7 @@ const styles = StyleSheet.create({
|
|||
});
|
||||
|
||||
WalletsAddMultisigStep2.navigationOptions = navigationStyle({
|
||||
headerTitle: null,
|
||||
title: null,
|
||||
gestureEnabled: false,
|
||||
swipeEnabled: false,
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue