Merge pull request #7452 from BlueWallet/coins

FIX: Coin Selected bar was visible without coins selected
This commit is contained in:
GLaDOS 2025-01-07 16:48:13 +00:00 committed by GitHub
commit 584f39f0aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 12 deletions

View File

@ -9,7 +9,6 @@ export type ScanQRCodeParamList = {
urTotal?: number;
urHave?: number;
backdoorText?: string;
onDismiss?: () => void;
onBarScanned?: (data: string) => void;
showFileImportButton?: boolean;
backdoorVisible?: boolean;

View File

@ -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 ? (