mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
SELF-702: Refactor navigation structure and dev utilities (#994)
* Refactor navigation and dev screens * refactor: rename passport screens to document * fixes * add missing header * fixes * type files
This commit is contained in:
@@ -81,7 +81,7 @@ export const handleUrl = (uri: string) => {
|
||||
const selfAppJson = JSON.parse(selfAppStr);
|
||||
useSelfAppStore.getState().setSelfApp(selfAppJson);
|
||||
useSelfAppStore.getState().startAppListener(selfAppJson.sessionId);
|
||||
navigationRef.navigate('ProveScreen');
|
||||
navigationRef.navigate('Prove');
|
||||
|
||||
return;
|
||||
} catch (error) {
|
||||
@@ -93,7 +93,7 @@ export const handleUrl = (uri: string) => {
|
||||
} else if (sessionId && typeof sessionId === 'string') {
|
||||
useSelfAppStore.getState().cleanSelfApp();
|
||||
useSelfAppStore.getState().startAppListener(sessionId);
|
||||
navigationRef.navigate('ProveScreen');
|
||||
navigationRef.navigate('Prove');
|
||||
} else if (mock_passport) {
|
||||
try {
|
||||
const data = JSON.parse(mock_passport);
|
||||
|
||||
@@ -278,7 +278,7 @@ export const useProvingStore = create<ProvingState>((set, get) => {
|
||||
if (state.value === 'passport_not_supported') {
|
||||
if (navigationRef.isReady()) {
|
||||
const currentPassportData = get().passportData;
|
||||
(navigationRef as any).navigate('UnsupportedPassport', {
|
||||
(navigationRef as any).navigate('UnsupportedDocument', {
|
||||
passportData: currentPassportData,
|
||||
});
|
||||
}
|
||||
@@ -290,7 +290,7 @@ export const useProvingStore = create<ProvingState>((set, get) => {
|
||||
}
|
||||
if (state.value === 'passport_data_not_found') {
|
||||
if (navigationRef.isReady()) {
|
||||
navigationRef.navigate('PassportDataNotFound');
|
||||
navigationRef.navigate('DocumentDataNotFound');
|
||||
}
|
||||
}
|
||||
if (state.value === 'failure') {
|
||||
|
||||
Reference in New Issue
Block a user