From 34d369594577936ad54e126586fc927f1a7d3646 Mon Sep 17 00:00:00 2001 From: gourav Date: Thu, 8 Jan 2026 13:30:22 +0530 Subject: [PATCH 01/14] fix: onboarding-flow-drawers --- .../src/routes/(auth)/onboarding/+page.svelte | 240 ++++++++++-------- .../src/routes/(auth)/register/+page.svelte | 223 +++++++++------- 2 files changed, 260 insertions(+), 203 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index a8f32f629..88682172b 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -338,110 +338,140 @@ onMount(async () => { - - get-started - {#if error} -
- {error} -
- {/if} - {#if loading} -
-
- -

Generating your eName

-
-
- {:else if preVerified} - {#if verificationSuccess} -

Verification Successful!

-

Your demo name: {demoName}

-

You can now continue to create your ePassport.

-
- Continue -
- {:else} -

- Welcome to Web 3.0 Data Spaces -

-

Enter Verification Code

- -

Enter Demo Name for your ePassport

- -
- Next +{#if isPaneOpen} +
+
+
+ get-started + + {#if error} +
+ {error} +
+ {/if} + + {#if loading} +
+ +

Generating your eName

+
+ {:else if preVerified} + {#if verificationSuccess} +

+ Verification Successful! +

+

+ Your demo name: {demoName} +

+

+ You can now continue to create your ePassport. +

+ {:else} +

+ Welcome to Web 3.0 Data Spaces +

+

+ Enter Verification Code +

+ +

+ Enter Demo Name for your ePassport +

+ + {/if} + {:else if checkingHardware} +
+ +

+ Checking device capabilities... +

+
+ {:else if showHardwareError} +

+ Hardware Security Not Available +

+

+ Your phone doesn't support hardware crypto keys, which + is a requirement for verified IDs. +

+

+ Please use the pre-verification code option to create a + demo account instead. +

+ {:else} +

+ Your Digital Self begins with the Real You +

+

+ In the Web 3.0 Data Space, identity is linked to + reality. We begin by verifying your real-world passport, + which serves as the foundation for issuing your secure + ePassport. At the same time, we generate your eName – a + unique digital identifier – and create your eVault to + store and protect your personal data. +

+ {/if} +
+ +
+ {#if !loading && !checkingHardware} + {#if preVerified} + {#if verificationSuccess} + + Continue + + {:else} + + Next + + {/if} + {:else if showHardwareError} + + Use Pre-Verification Code + + {:else} + + Next + + {/if} + {/if}
- {/if} - {:else if checkingHardware} -
-
- -

Checking device capabilities...

-
-
- {:else if showHardwareError} -

- Hardware Security Not Available -

-

- Your phone doesn't support hardware crypto keys, which is a - requirement for verified IDs. -

-

- Please use the pre-verification code option to create a demo account - instead. -

-
- { - isPaneOpen = false; - handlePreVerified(); - }} - > - Use Pre-Verification Code - -
- {:else} -

- Your Digital Self begins with the Real You -

-

- In the Web 3.0 Data Space, identity is linked to reality. We begin - by verifying your real-world passport, which serves as the - foundation for issuing your secure ePassport. At the same time, we - generate your eName – a unique digital identifier – and create your - eVault to store and protect your personal data. -

-
- Next
- {/if} - +
+{/if} diff --git a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte index d0d454722..7d6d39d61 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte @@ -155,13 +155,13 @@ onMount(async () => { class="flex-1" callback={() => goto("/onboarding")}>Back - - Confirm - + variant={btnVariant} + callback={handleFirstStep} + > + Confirm +
{:else} @@ -182,104 +182,131 @@ onMount(async () => { class="flex-1" callback={() => goto("/onboarding")}>Back - Confirm + callback={handleConfirm}>Confirm
{/if} - - {#if !isBiometricScreen} -
- - - - line - line -
-

PIN has been set!

-

- Your PIN has been created. You’ll use it to access your digital - entity securely. -

-
- { showDrawer = false; }}>Back - Next -
- {:else} -
- - - - line - line -
-

{isBiometricsAdded ? "You’re all set!" : "Add biometrics"}

-

- {isBiometricsAdded - ? "Your biometrics have been successfully added." - : "Use your fingerprint or face recognition for faster, more secure logins."} -

- {#if !isBiometricsAdded} -
- Skip -
- Set up +
+
+ {#if !isBiometricScreen} +
-

+ + + line + line +

+

PIN has been set!

+

+ Your PIN has been created. You’ll use it to access your + digital entity securely. +

+ {:else} +
- Biometrics unavailable. + + + + line + line +
+

+ {isBiometricsAdded + ? "You’re all set!" + : "Add biometrics"} +

+

+ {isBiometricsAdded + ? "Your biometrics have been successfully added." + : "Use your fingerprint or face recognition for faster, more secure logins."}

-
-
- {:else} -
- { showDrawer = false; }}>Back - Continue + {/if} + + +
+ {#if !isBiometricScreen} +
+ { + showDrawer = false; + }}>Back + Next +
+ {:else if !isBiometricsAdded} +
+
+ Skip + Set up +
+ {#if !isBiometricsAvailable} +

+ Biometrics unavailable. +

+ {/if} +
+ {:else} +
+ { + showDrawer = false; + }}>Back + + Continue + +
+ {/if}
- {/if} - {/if} - +
+
+{/if} From 86b598f31d8403d3d22c3021ffec8733d9d2287c Mon Sep 17 00:00:00 2001 From: gourav Date: Thu, 8 Jan 2026 14:16:18 +0530 Subject: [PATCH 02/14] fix: added a back button --- .../eid-wallet/src/routes/(auth)/onboarding/+page.svelte | 9 +++++++++ .../eid-wallet/src/routes/(auth)/register/+page.svelte | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index 88682172b..0c5bec651 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -12,6 +12,7 @@ import { ButtonAction, Drawer } from "$lib/ui"; import * as Button from "$lib/ui/Button"; import { capitalize } from "$lib/utils"; import { ArrowLeft01Icon } from "@hugeicons/core-free-icons"; +import { HugeiconsIcon } from "@hugeicons/svelte"; import * as falso from "@ngneat/falso"; import axios from "axios"; import { getContext, onMount } from "svelte"; @@ -341,6 +342,14 @@ onMount(async () => { {#if isPaneOpen}
+
+ +
{
+
+ +
{#if !isBiometricScreen}
Date: Fri, 9 Jan 2026 16:48:57 +0530 Subject: [PATCH 03/14] fix: kyc verification pages drawers into full page component --- .../src/routes/(auth)/verify/+page.svelte | 138 ++++++++++-------- 1 file changed, 77 insertions(+), 61 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte index 657efa62f..870dff727 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte @@ -29,6 +29,7 @@ import { verifStep, verificaitonId, } from "./store"; +import { HugeiconsIcon } from "@hugeicons/svelte"; type Document = { country: { value: string }; @@ -393,68 +394,83 @@ onMount(async () => { >I'm ready {/if} - -
- {#if $verifStep === 0} - - {:else if $verifStep === 1} - - {:else if $verifStep === 2} - - {:else if loading} -
-
- -

Generating your eName

-
-
- {:else} -
- {#if $status === "approved"} -
-

Your verification was a success

-

You can now continue on to create your eName

-
- {:else if $status === "duplicate"} -
-

Old eVault Found

-

- We found an existing eVault associated with your - identity. You can claim it back to continue - using your account. -

-
- {:else if $status === "resubmission_requested"} -

Your verification failed due to the reason

-

{$reason}

- {:else} -

Your verification failed

-

{$reason}

- {/if} -
-
- {#if $status !== "declined"} - goto("/onboarding")}>Back - {$status === "approved" - ? "Continue" - : $status === "duplicate" - ? "Claim old eVault" - : "Retry"} +
+ +
+ +
+ {#if $verifStep === 0} + + {:else if $verifStep === 1} + + {:else if $verifStep === 2} + + {:else if loading} +
+
- {/if} -
- {/if} + +

Generating your eName

+
+
+ {:else} +
+ {#if $status === "approved"} +
+

Your verification was a success

+

+ You can now continue on to create your eName +

+
+ {:else if $status === "duplicate"} +
+

Old eVault Found

+

+ We found an existing eVault associated with + your identity. You can claim it back to + continue using your account. +

+
+ {:else if $status === "resubmission_requested"} +

Your verification failed due to the reason

+

{$reason}

+ {:else} +

Your verification failed

+ +

{$reason}

+ {/if} +
+
+ {#if $status !== "declined"} + goto("/onboarding")} + >Back + {$status === "approved" + ? "Continue" + : $status === "duplicate" + ? "Claim old eVault" + : "Retry"} + {/if} +
+ {/if} +
-
+ {/if} From 9df55fd7ff92459da084bfe178ed31d78960dc83 Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 9 Jan 2026 16:52:46 +0530 Subject: [PATCH 04/14] fix: format --- .../src/routes/(auth)/verify/+page.svelte | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte index 870dff727..e5ecd0432 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte @@ -414,13 +414,11 @@ onMount(async () => { {:else if $verifStep === 2} {:else if loading} -
-
- -

Generating your eName

-
+
+ +

Generating your eName

{:else}
@@ -436,8 +434,7 @@ onMount(async () => {

Old eVault Found

We found an existing eVault associated with - your identity. You can claim it back to - continue using your account. + your identity...

{:else if $status === "resubmission_requested"} @@ -445,29 +442,33 @@ onMount(async () => {

{$reason}

{:else}

Your verification failed

-

{$reason}

{/if}
-
- {#if $status !== "declined"} - goto("/onboarding")} - >Back - {$status === "approved" - ? "Continue" - : $status === "duplicate" - ? "Claim old eVault" - : "Retry"} - {/if} + {/if} +
+ +
+ {#if $verifStep > 2 && !loading && $status !== "declined"} +
+ goto("/onboarding")} + > + Back + + + {$status === "approved" + ? "Continue" + : $status === "duplicate" + ? "Claim old eVault" + : "Retry"} +
{/if}
From 1f44a56554dfd7c1b20cdae5e746eba8c1d1209c Mon Sep 17 00:00:00 2001 From: gourav Date: Fri, 9 Jan 2026 17:04:28 +0530 Subject: [PATCH 05/14] fix: code rabbit suggestion --- .../src/routes/(auth)/verify/+page.svelte | 666 +++++++++--------- 1 file changed, 342 insertions(+), 324 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte index e5ecd0432..588e6c542 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte @@ -1,361 +1,369 @@
{ {/if} {#if showVeriffModal} -
+ From 0a8052454d922f40efb0f98eee28304f0bfb9836 Mon Sep 17 00:00:00 2001 From: gourav Date: Mon, 12 Jan 2026 13:19:10 +0530 Subject: [PATCH 08/14] fix: global state --- .../eid-wallet/src/routes/(auth)/onboarding/+page.svelte | 8 +++----- .../eid-wallet/src/routes/(auth)/register/+page.svelte | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index 7d23bf847..45150555d 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -8,11 +8,8 @@ import type { KeyManager } from "$lib/crypto"; import { Hero } from "$lib/fragments"; import { GlobalState } from "$lib/global"; import type { KeyServiceContext } from "$lib/global"; -import { ButtonAction, Drawer } from "$lib/ui"; -import * as Button from "$lib/ui/Button"; +import { ButtonAction } from "$lib/ui"; import { capitalize } from "$lib/utils"; -import { ArrowLeft01Icon } from "@hugeicons/core-free-icons"; -import { HugeiconsIcon } from "@hugeicons/svelte"; import * as falso from "@ngneat/falso"; import axios from "axios"; import { getContext, onMount } from "svelte"; @@ -41,7 +38,7 @@ const handleGetStarted = async () => { if (!globalState) { globalState = getContext<() => GlobalState>("globalState")(); } - + globalState.userController.isFake = false; // Actually try to generate a test hardware key const testKeyId = `hardware-test-${Date.now()}`; console.log( @@ -82,6 +79,7 @@ const handleGetStarted = async () => { }; const handlePreVerified = () => { + globalState.userController.isFake = true; isPaneOpen = true; preVerified = true; }; diff --git a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte index d5e1c0241..47d7b5e6b 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte @@ -2,8 +2,7 @@ import { goto } from "$app/navigation"; import { Hero } from "$lib/fragments"; import type { GlobalState } from "$lib/global"; -import { ButtonAction, Drawer, InputPin } from "$lib/ui"; -import * as Button from "$lib/ui/Button"; +import { ButtonAction, InputPin } from "$lib/ui"; import { ArrowLeft01Icon, CircleLock01Icon, From 3cba994c2d027d809fe5d71854e2223e40a619e8 Mon Sep 17 00:00:00 2001 From: gourav Date: Mon, 12 Jan 2026 13:20:08 +0530 Subject: [PATCH 09/14] fix: global state --- .../src/routes/(auth)/onboarding/+page.svelte | 504 +++++++++--------- 1 file changed, 256 insertions(+), 248 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index 45150555d..b3ff0bfc9 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -1,282 +1,290 @@
Date: Mon, 12 Jan 2026 14:25:45 +0530 Subject: [PATCH 10/14] fix: added back button and handled state in register page --- .../src/routes/(auth)/onboarding/+page.svelte | 504 +++++++++--------- .../src/routes/(auth)/register/+page.svelte | 404 ++++++-------- .../src/routes/(auth)/verify/+page.svelte | 88 +-- 3 files changed, 454 insertions(+), 542 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index b3ff0bfc9..45150555d 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -1,290 +1,282 @@
("CREATE"); + let pin = $state(""); let repeatPin = $state(""); -let firstStep = $state(true); -let showDrawer = $state(false); let isBiometricsAvailable = $state(false); -let isBiometricScreen = $state(false); -let isBiometricsAdded = $state(false); let isError = $state(false); let btnVariant = $state<"soft" | "solid">("soft"); - let globalState: GlobalState | undefined = $state(undefined); -const handleFirstStep = async () => { - if (pin.length === 4) { - firstStep = false; - btnVariant = "solid"; +const handleBack = () => { + if (currentStep === "REPEAT") { + currentStep = "CREATE"; + repeatPin = ""; + } else if (currentStep === "PIN_DONE") { + currentStep = "REPEAT"; + } else if (currentStep === "BIOMETRICS") { + currentStep = "PIN_DONE"; + } else if (currentStep === "ALL_SET") { + currentStep = "BIOMETRICS"; + } else { + goto("/onboarding"); } }; -let handleConfirm: () => Promise = $state(async () => {}); - -const handleNext = async () => { - //handle next logic goes here - isBiometricScreen = true; +const handleConfirmFirst = () => { + if (pin.length === 4) currentStep = "REPEAT"; }; -const handleSkip = async () => { - // handle skip biometrics logic goes here - if (!globalState) return goto("/onboarding"); - globalState.isOnboardingComplete = true; - goto("/review"); +const handleConfirmRepeat = async () => { + if (pin !== repeatPin) { + isError = true; + currentStep = "CREATE"; + pin = ""; + repeatPin = ""; + return; + } + + try { + await globalState?.securityController.setOnboardingPin(pin, repeatPin); + currentStep = "PIN_DONE"; + } catch (error) { + console.error("Failed to update PIN:", error); + isError = true; + } }; -let handleSetupBiometrics = $state(async () => {}); +const handleSetupBiometrics = async () => { + if (isBiometricsAvailable && globalState) { + globalState.securityController.biometricSupport = true; + currentStep = "ALL_SET"; + } +}; -const handleBiometricsAdded = async () => { - //handle logic when biometrics added successfully +const finishOnboarding = () => { if (!globalState) return goto("/onboarding"); globalState.isOnboardingComplete = true; goto("/review"); }; $effect(() => { - if (repeatPin && repeatPin.length === 4 && pin === repeatPin) - isError = false; -}); - -$effect(() => { - // First step button - if (firstStep) { + if (currentStep === "CREATE") btnVariant = pin.length === 4 ? "solid" : "soft"; - } else { - // Second step button - if (repeatPin.length === 4 && pin === repeatPin) { - btnVariant = "solid"; - isError = false; - } else { - btnVariant = "soft"; - } - } + else if (currentStep === "REPEAT") + btnVariant = repeatPin.length === 4 ? "solid" : "soft"; }); onMount(async () => { globalState = getContext<() => GlobalState>("globalState")(); - if (!globalState) throw new Error("Global state is not defined"); - try { isBiometricsAvailable = (await checkStatus()).isAvailable; - console.log("isBiometricsAvailable", isBiometricsAvailable); - } catch (error) { + } catch (e) { isBiometricsAvailable = false; - console.error("Failed to check biometrics status:", error); } - - handleConfirm = async () => { - if (repeatPin.length < 4) { - isError = true; - return; - } - - if (pin !== repeatPin) { - isError = true; - firstStep = true; - return; - } - - isError = false; - try { - await globalState?.securityController.setOnboardingPin( - pin, - repeatPin, - ); - showDrawer = true; - } catch (error) { - console.error("Failed to update PIN:", error); - isError = true; - } - }; - - handleSetupBiometrics = async () => { - if (!globalState) - throw new Error( - "Cannot set biometric support, Global state is not defined", - ); - if (isBiometricsAvailable) { - try { - globalState.securityController.biometricSupport = true; - } catch (error) { - console.error("Failed to enable biometric support:", error); - // Consider showing an error message to the user - return; - } - } - isBiometricsAdded = true; - }; }); -{#if firstStep} -
-
+
+
+ {#if currentStep === "CREATE"} {#snippet subtitle()} Enter your 4-digit PIN code {/snippet} - -

- Your PIN does not match, try again. -

-
-
- goto("/onboarding")}>Back - - Confirm - -
-
-{:else} -
-
+ {#if isError}

+ PINs didn't match. Try again. +

{/if} + {:else if currentStep === "REPEAT"} {#snippet subtitle()} Confirm by entering PIN again {/snippet} -
-
- goto("/onboarding")}>Back - Confirm -
-
-{/if} - -{#if showDrawer} -
-
-
-
- -
- {#if !isBiometricScreen} -
- - - - line +
+ + - line -
+ + line + line +
+ + {#if currentStep === "PIN_DONE"}

PIN has been set!

Your PIN has been created. You’ll use it to access your digital entity securely.

+ {:else if currentStep === "BIOMETRICS"} +

Add biometrics

+

+ Use your fingerprint or face recognition for faster, + more secure logins. +

{:else} -
- - - - line - line -
-

- {isBiometricsAdded - ? "You’re all set!" - : "Add biometrics"} -

+

You’re all set!

- {isBiometricsAdded - ? "Your biometrics have been successfully added." - : "Use your fingerprint or face recognition for faster, more secure logins."} + Your biometrics have been successfully added.

{/if}
- -
- {#if !isBiometricScreen} -
+ {/if} +
+ +
+ {#if currentStep === "BIOMETRICS"} +
+
+ + Back + + + Skip + +
+ + Set up + + {#if !isBiometricsAvailable} +

+ Biometrics unavailable on this device. +

+ {/if} +
+ {:else} +
+
+ + Back + +
+
+ {#if currentStep === "CREATE"} { - showDrawer = false; - }}>Back - Next + {:else if currentStep === "REPEAT"} + -
- {:else if !isBiometricsAdded} -
-
- Skip - Set up -
- {#if !isBiometricsAvailable} -

- Biometrics unavailable. -

- {/if} -
- {:else} -
+ Confirm + + {:else if currentStep === "PIN_DONE"} { - showDrawer = false; - }}>Back + Next + + {:else if currentStep === "ALL_SET"} Continue -
- {/if} + {/if} +
-
-
-{/if} + {/if} + + diff --git a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte index 3c2c014c1..05ad487e1 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte @@ -277,8 +277,8 @@ onMount(async () => { // Initialize key manager and check if default key pair exists try { - await initializeKeyManager(); - await ensureKeyForVerification(); + // await initializeKeyManager(); + // await ensureKeyForVerification(); } catch (error) { console.error("Failed to initialize keys for verification:", error); // If key initialization fails, redirect back to onboarding @@ -415,20 +415,7 @@ onDestroy(() => { aria-label="Identity Verification" class="fixed inset-0 z-50 bg-white flex flex-col h-full" > -
- -
- -
+
{#if $verifStep === 0} {:else if $verifStep === 1} @@ -447,11 +434,9 @@ onDestroy(() => { {#if $status === "approved"}

- Your verification was a success + Verification Success

-

- You can now continue on to create your eName -

+

You can now continue to create your eName

{:else if $status === "duplicate"}
@@ -460,14 +445,14 @@ onDestroy(() => {

We found an existing eVault associated with - your identity... + your identity.

{:else if $status === "resubmission_requested"} -

Your verification failed due to the reason

+

Resubmission Required

{$reason}

{:else} -

Your verification failed

+

Verification Failed

{$reason}

{/if}
@@ -475,26 +460,43 @@ onDestroy(() => {
- {#if $verifStep > 2 && !loading && $status !== "declined"} -
- goto("/onboarding")} - > - Back - - - {$status === "approved" - ? "Continue" - : $status === "duplicate" - ? "Claim old eVault" - : "Retry"} - + {#if !loading} +
+
+ { + // If in early steps, close modal; if finished, go to onboarding + if ($verifStep > 2) { + goto("/onboarding"); + } else { + closeEventStream(); + showVeriffModal = false; + } + }} + > + Back + +
+ +
+ {#if $verifStep > 2 && $status !== "declined"} + + {$status === "approved" + ? "Continue" + : $status === "duplicate" + ? "Claim Vault" + : "Retry"} + + {:else if $verifStep <= 2} +
+ {/if} +
{/if}
From ee60ea3eb586431feff97ffc7bdb4967a206c4f8 Mon Sep 17 00:00:00 2001 From: gourav Date: Mon, 12 Jan 2026 14:36:33 +0530 Subject: [PATCH 11/14] fix: format, lint and code rabbit suggestions --- .../eid-wallet/src/routes/(auth)/onboarding/+page.svelte | 4 ++-- .../eid-wallet/src/routes/(auth)/verify/+page.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index 45150555d..31c04ef96 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -359,7 +359,7 @@ onMount(async () => {
- +

Generating your eName

{:else if preVerified} @@ -400,7 +400,7 @@ onMount(async () => {
- +

Checking device capabilities...

diff --git a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte index 05ad487e1..5c173ffed 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte @@ -277,8 +277,8 @@ onMount(async () => { // Initialize key manager and check if default key pair exists try { - // await initializeKeyManager(); - // await ensureKeyForVerification(); + await initializeKeyManager(); + await ensureKeyForVerification(); } catch (error) { console.error("Failed to initialize keys for verification:", error); // If key initialization fails, redirect back to onboarding From 3823908cb15ef4474519911e01e1308c999bc07f Mon Sep 17 00:00:00 2001 From: gourav Date: Tue, 13 Jan 2026 11:34:04 +0530 Subject: [PATCH 12/14] fix: removed back button from first step of registeration --- .../src/routes/(auth)/register/+page.svelte | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte index a932cfc59..b257ddeaf 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte @@ -187,15 +187,17 @@ onMount(async () => {
{:else}
-
- - Back - -
+ {#if currentStep !== "CREATE"} +
+ + Back + +
+ {/if}
{#if currentStep === "CREATE"} Date: Tue, 13 Jan 2026 12:27:11 +0530 Subject: [PATCH 13/14] fix: code rabbit suggestion --- .../eid-wallet/src/routes/(auth)/register/+page.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte index b257ddeaf..41d38b3ab 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte @@ -51,6 +51,9 @@ const handleConfirmRepeat = async () => { currentStep = "PIN_DONE"; } catch (error) { console.error("Failed to update PIN:", error); + currentStep = "CREATE"; + pin = ""; + repeatPin = ""; isError = true; } }; From b3cbb2f8bca8e3ad272670ffbf05149ba5f6f8e7 Mon Sep 17 00:00:00 2001 From: gourav Date: Tue, 13 Jan 2026 13:03:58 +0530 Subject: [PATCH 14/14] fix: added code rabbit suggestion --- .../src/routes/(auth)/register/+page.svelte | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte index 41d38b3ab..c00e6c925 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte @@ -38,6 +38,8 @@ const handleConfirmFirst = () => { }; const handleConfirmRepeat = async () => { + if (repeatPin.length !== 4) return; + if (pin !== repeatPin) { isError = true; currentStep = "CREATE"; @@ -46,7 +48,17 @@ const handleConfirmRepeat = async () => { return; } + if (!globalState) { + console.error("Global state not available; cannot set onboarding PIN."); + isError = true; + currentStep = "CREATE"; + pin = ""; + repeatPin = ""; + return; + } + try { + isError = false; await globalState?.securityController.setOnboardingPin(pin, repeatPin); currentStep = "PIN_DONE"; } catch (error) {