diff --git a/navigation/DetailViewStackParamList.ts b/navigation/DetailViewStackParamList.ts index 036c2d6de..4e47fdb9f 100644 --- a/navigation/DetailViewStackParamList.ts +++ b/navigation/DetailViewStackParamList.ts @@ -9,7 +9,6 @@ export type ScanQRCodeParamList = { urTotal?: number; urHave?: number; backdoorText?: string; - onDismiss?: () => void; onBarScanned?: (data: string) => void; showFileImportButton?: boolean; backdoorVisible?: boolean; diff --git a/screen/send/ScanQRCode.js b/screen/send/ScanQRCode.js index 3fe24b52a..18d76bd5a 100644 --- a/screen/send/ScanQRCode.js +++ b/screen/send/ScanQRCode.js @@ -89,7 +89,7 @@ const ScanQRCode = () => { const previousRoute = navigationState.routes[navigationState.routes.length - 2]; const defaultLaunchedBy = previousRoute ? previousRoute.name : undefined; - const { launchedBy = defaultLaunchedBy, onBarScanned, onDismiss, showFileImportButton } = route.params || {}; + const { launchedBy = defaultLaunchedBy, onBarScanned, showFileImportButton } = route.params || {}; const scannedCache = {}; const { colors } = useTheme(); const isFocused = useIsFocused(); @@ -300,16 +300,7 @@ const ScanQRCode = () => { }; const dismiss = () => { - if (launchedBy) { - let merge = true; - if (typeof onBarScanned !== 'function') { - merge = false; - } - navigation.navigate({ name: launchedBy, params: {}, merge }); - } else { - navigation.goBack(); - } - if (onDismiss) onDismiss(); + navigation.goBack(); }; const render = isLoading ? (