Refactor deep link handling to simplify navigation to ProveScreen (#1104)

* Refactor deep link handling to simplify navigation to ProveScreen

- Removed the reset of the navigation stack and replaced it with a direct navigation call to 'Prove'.
- This change streamlines the deep link handling process, ensuring a more straightforward user experience when navigating to the ProveScreen.

* update lock and fix tests

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
This commit is contained in:
turnoffthiscomputer
2025-09-20 07:41:55 +02:00
committed by GitHub
parent 6063aedd02
commit f6881bf2d9
3 changed files with 5 additions and 17 deletions

View File

@@ -105,10 +105,7 @@ export const handleUrl = (uri: string) => {
useSelfAppStore.getState().setSelfApp(selfAppJson);
useSelfAppStore.getState().startAppListener(selfAppJson.sessionId);
// Reset navigation stack with correct parent -> ProveScreen
navigationRef.reset(
createDeeplinkNavigationState('ProveScreen', correctParentScreen),
);
navigationRef.navigate('Prove' as never);
return;
} catch (error) {
@@ -123,10 +120,7 @@ export const handleUrl = (uri: string) => {
useSelfAppStore.getState().cleanSelfApp();
useSelfAppStore.getState().startAppListener(sessionId);
// Reset navigation stack with correct parent -> ProveScreen
navigationRef.reset(
createDeeplinkNavigationState('ProveScreen', correctParentScreen),
);
navigationRef.navigate('Prove' as never);
} else if (mock_passport) {
try {
const data = JSON.parse(mock_passport);