MCPcopy
hub / github.com/BlueWallet/BlueWallet / proceedWithNavigation

Function proceedWithNavigation

hooks/useExtendedNavigation.ts:54–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 const isRequiresWalletExportIsSaved = requiresWalletExportIsSaved.includes(screenName);
53
54 const proceedWithNavigation = () => {
55 console.log('Proceeding with navigation to', screenName);
56
57 // Navigation logic based on current route and target screen
58 if (navigationRef.current?.isReady()) {
59 // Get the current route - we need to know which navigator we're in
60 const currentRoute = navigationRef.current.getCurrentRoute();
61 const currentRouteName = currentRoute?.name;
62
63 // Handle specific cases for nested navigation
64 if (currentRouteName === 'DrawerRoot') {
65 // If we're in DrawerRoot and trying to navigate to a screen that exists in DetailViewStackScreensStack
66 originalNavigation.navigate('DrawerRoot', {
67 screen: 'DetailViewStackScreensStack',
68 params: {
69 screen: screenName,
70 params,
71 },
72 });
73 } else {
74 // Normal navigation
75 if (typeof screenOrOptions === 'string') {
76 originalNavigation.navigate({ name: screenOrOptions, params, merge: options?.merge });
77 } else {
78 originalNavigation.navigate({ ...screenOrOptions, params, merge: options?.merge });
79 }
80 }
81 }
82 };
83
84 (async () => {
85 // Skip checks for ScanQRCode screen

Callers 1

useExtendedNavigationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected