From 67ec3485ae64ab4a5614cb98ba07ebb1f2ad104d Mon Sep 17 00:00:00 2001 From: coodos Date: Tue, 24 Feb 2026 18:34:23 +0530 Subject: [PATCH 1/9] fix: button layout --- infrastructure/eid-wallet/src/routes/(app)/+layout.svelte | 5 ++++- .../eid-wallet/src/routes/(auth)/e-passport/+page.svelte | 6 +++--- .../eid-wallet/src/routes/(auth)/onboarding/+page.svelte | 7 ++++--- .../eid-wallet/src/routes/(auth)/register/+page.svelte | 6 +++--- .../eid-wallet/src/routes/(auth)/review/+page.svelte | 6 +++--- infrastructure/eid-wallet/src/routes/+layout.svelte | 5 +---- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(app)/+layout.svelte b/infrastructure/eid-wallet/src/routes/(app)/+layout.svelte index a9ed5b2a5..1179735b1 100644 --- a/infrastructure/eid-wallet/src/routes/(app)/+layout.svelte +++ b/infrastructure/eid-wallet/src/routes/(app)/+layout.svelte @@ -60,7 +60,10 @@ $effect(() => { {/if} --> -
+
{@render children()}
diff --git a/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte index c40c9b3f3..6fd2f6de5 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte @@ -33,8 +33,8 @@ onMount(async () => {
{
-
+
Finish goto("/register")}>Back
diff --git a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte index 756bfdaaa..cea85daad 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte @@ -701,7 +701,8 @@ onMount(() => {
{
-
+
{
-
+
{
{#if currentStep === "CREATE"} @@ -179,7 +179,7 @@ onMount(async () => { {/if}
-
+
{#if currentStep === "BIOMETRICS"} {
@@ -39,5 +39,5 @@ onMount(async () => {
- Next + Next
diff --git a/infrastructure/eid-wallet/src/routes/+layout.svelte b/infrastructure/eid-wallet/src/routes/+layout.svelte index daee8db3b..39ea4ce33 100644 --- a/infrastructure/eid-wallet/src/routes/+layout.svelte +++ b/infrastructure/eid-wallet/src/routes/+layout.svelte @@ -679,10 +679,7 @@ $effect(() => {
-
+
{#if children} {@render children()} {/if} From a28adb88f14c20ffc68c83a7ddb02ea8f5c65c3f Mon Sep 17 00:00:00 2001 From: coodos Date: Tue, 24 Feb 2026 18:35:55 +0530 Subject: [PATCH 2/9] chore: bump version --- infrastructure/eid-wallet/package.json | 2 +- .../eid-wallet/src-tauri/tauri.conf.json | 8 +- .../src/routes/(app)/settings/+page.svelte | 209 +++++++++--------- 3 files changed, 111 insertions(+), 108 deletions(-) diff --git a/infrastructure/eid-wallet/package.json b/infrastructure/eid-wallet/package.json index 05f462517..8f9b9575f 100644 --- a/infrastructure/eid-wallet/package.json +++ b/infrastructure/eid-wallet/package.json @@ -1,6 +1,6 @@ { "name": "eid-wallet", - "version": "0.5.0", + "version": "0.6.0", "description": "", "type": "module", "scripts": { diff --git a/infrastructure/eid-wallet/src-tauri/tauri.conf.json b/infrastructure/eid-wallet/src-tauri/tauri.conf.json index 8431a83ea..353ed2a3b 100644 --- a/infrastructure/eid-wallet/src-tauri/tauri.conf.json +++ b/infrastructure/eid-wallet/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "eID for W3DS", - "version": "0.5.0", + "version": "0.6.0", "identifier": "foundation.metastate.eid-wallet", "build": { "beforeDevCommand": "pnpm dev", @@ -18,7 +18,9 @@ } ], "security": { - "capabilities": ["mobile-capability"], + "capabilities": [ + "mobile-capability" + ], "csp": null } }, @@ -26,7 +28,7 @@ "active": true, "targets": "all", "android": { - "versionCode": 12 + "versionCode": 22 }, "icon": [ "icons/32x32.png", diff --git a/infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte b/infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte index 865632b5c..a8a7b437c 100644 --- a/infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte @@ -1,115 +1,116 @@
@@ -148,7 +149,7 @@ $effect(() => { onclick={handleVersionTap} disabled={isRetrying} > - Version v0.5.0.0 + Version v0.6.0.0 {#if retryMessage} From 658d4027bc88e3d800cf7399c44d2852c4aecc51 Mon Sep 17 00:00:00 2001 From: coodos Date: Tue, 24 Feb 2026 18:41:02 +0530 Subject: [PATCH 3/9] style: consistent heights --- .../src/routes/(auth)/e-passport/+page.svelte | 69 +-- .../src/routes/(auth)/login/+page.svelte | 411 +++++++++--------- .../src/routes/(auth)/register/+page.svelte | 266 +++++++----- .../src/routes/(auth)/review/+page.svelte | 50 ++- 4 files changed, 422 insertions(+), 374 deletions(-) diff --git a/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte index 6fd2f6de5..ccce17862 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte @@ -1,42 +1,43 @@
-
+
{
- Finish - goto("/register")}>Back + Finish + goto("/register")}>Back
diff --git a/infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte index 252ba6446..b51918e1f 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/login/+page.svelte @@ -1,246 +1,257 @@ -
-
- +
+
+ {#snippet subtitle()} {#if isPostAuthLoading} Logging you in... diff --git a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte index 05a0fecda..11f593df8 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte @@ -1,122 +1,127 @@
-
+
{#if currentStep === "CREATE"} - + {#snippet subtitle()} Enter your 4-digit PIN code {/snippet} @@ -126,7 +131,7 @@ onMount(async () => { PINs didn't match. Try again.

{/if} {:else if currentStep === "REPEAT"} - + {#snippet subtitle()} Confirm by entering PIN again {/snippet} @@ -188,7 +193,11 @@ onMount(async () => { > Set up Biometrics - + Skip {#if !isBiometricsAvailable} @@ -197,21 +206,40 @@ onMount(async () => {

{/if} {:else if currentStep === "CREATE"} - + Confirm {:else if currentStep === "REPEAT"} - + Confirm - Back + Back {:else if currentStep === "PIN_DONE"} - { currentStep = "BIOMETRICS"; }}> + { + currentStep = "BIOMETRICS"; + }} + > Next - Back + Back {:else if currentStep === "ALL_SET"} - Continue + Continue {/if}
diff --git a/infrastructure/eid-wallet/src/routes/(auth)/review/+page.svelte b/infrastructure/eid-wallet/src/routes/(auth)/review/+page.svelte index 36ca58ce9..975d10337 100644 --- a/infrastructure/eid-wallet/src/routes/(auth)/review/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(auth)/review/+page.svelte @@ -1,36 +1,36 @@
-
+
{#snippet subtitle()} This identifier is permanently yours, and it stays with you for @@ -39,5 +39,7 @@ onMount(async () => {
- Next + Next
From a77fc1641fe84b1a7b7c07b4f1e97c1628bacb55 Mon Sep 17 00:00:00 2001 From: coodos Date: Wed, 25 Feb 2026 16:34:13 +0530 Subject: [PATCH 4/9] fix: styling --- .../src/lib/global/controllers/key.ts | 103 +- .../eid-wallet/src/lib/global/state.ts | 27 + .../src/lib/ui/BottomSheet/BottomSheet.svelte | 55 + .../CameraPermissionDialog.svelte | 23 +- infrastructure/eid-wallet/src/lib/ui/index.ts | 1 + .../src/routes/(app)/main/+page.svelte | 8 +- .../scan-qr/components/AuthDrawer.svelte | 21 +- .../scan-qr/components/LoggedInDrawer.svelte | 17 +- .../scan-qr/components/RevealDrawer.svelte | 15 +- .../scan-qr/components/SigningDrawer.svelte | 49 +- .../components/SocialBindingDrawer.svelte | 21 +- .../src/routes/(app)/scan-qr/scanLogic.ts | 9 +- .../src/routes/(app)/settings/+page.svelte | 251 +-- .../(app)/settings/passphrase/+page.svelte | 6 +- .../routes/(app)/settings/pin/+page.svelte | 6 +- .../src/routes/(auth)/login/+page.svelte | 423 +++-- .../src/routes/(auth)/onboarding/+page.svelte | 1423 +++++++++-------- infrastructure/vault-core-OLDDDD/README.md | 188 +++ .../vault-core-OLDDDD/generate-test-token.js | 68 + infrastructure/vault-core-OLDDDD/package.json | 58 + .../vault-core-OLDDDD/src/config/database.ts | 32 + .../src/controllers/NotificationController.ts | 184 +++ .../src/controllers/ProvisioningController.ts | 34 + .../src/controllers/VerificationController.ts | 265 +++ .../src/core/db/db.service.spec.ts | 639 ++++++++ .../src/core/db/db.service.ts | 1368 ++++++++++++++++ .../src/core/db/envelope-hash.ts | 29 + .../src/core/db/migrations/add-ename-index.ts | 34 + .../add-envelope-operation-log-index.ts | 34 + .../src/core/db/migrations/add-user-index.ts | 34 + .../backfill-envelope-operation-logs.ts | 89 ++ .../migrations/migrate-publickey-to-array.ts | 48 + .../src/core/db/ontology-platform.spec.ts | 42 + .../src/core/db/ontology-platform.ts | 41 + .../src/core/db/retry-neo4j.ts | 40 + .../vault-core-OLDDDD/src/core/db/schema.ts | 104 ++ .../vault-core-OLDDDD/src/core/db/types.ts | 172 ++ .../vault-core-OLDDDD/src/core/http/server.ts | 721 +++++++++ .../vault-core-OLDDDD/src/core/http/types.ts | 18 + .../src/core/protocol/examples/examples.ts | 228 +++ .../src/core/protocol/graphql-server.spec.ts | 286 ++++ .../src/core/protocol/graphql-server.ts | 1363 ++++++++++++++++ .../protocol/idiomatic-graphql-api.spec.ts | 1289 +++++++++++++++ .../src/core/protocol/typedefs.ts | 307 ++++ .../core/protocol/vault-access-guard.spec.ts | 890 +++++++++++ .../src/core/protocol/vault-access-guard.ts | 296 ++++ .../src/core/types/binding-document.ts | 44 + .../vault-core-OLDDDD/src/core/types/w3id.ts | 15 + .../vault-core-OLDDDD/src/core/utils/codec.ts | 86 + .../src/core/utils/signer.ts | 44 + .../src/core/w3id/log-service.ts | 42 + .../src/core/w3id/log-storage.ts | 98 ++ .../vault-core-OLDDDD/src/core/w3id/w3id.ts | 31 + .../src/e2e/evault-core.e2e.spec.ts | 653 ++++++++ .../src/entities/Notification.ts | 28 + .../src/entities/Verification.ts | 52 + infrastructure/vault-core-OLDDDD/src/index.ts | 265 +++ .../src/migrations/1748932757644-migration.ts | 14 + .../src/migrations/1748966722767-migration.ts | 14 + .../src/migrations/1748968097591-migration.ts | 14 + .../src/migrations/1758389959600-migration.ts | 14 + .../src/migrations/1759924736417-migration.ts | 20 + .../src/migrations/1759926271076-migration.ts | 14 + .../services/BindingDocumentService.spec.ts | 527 ++++++ .../src/services/BindingDocumentService.ts | 237 +++ .../src/services/NotificationService.spec.ts | 302 ++++ .../src/services/NotificationService.ts | 142 ++ .../src/services/ProvisioningService.spec.ts | 322 ++++ .../src/services/ProvisioningService.ts | 216 +++ .../src/services/VerificationService.spec.ts | 135 ++ .../src/services/VerificationService.ts | 58 + .../src/test-utils/e2e-setup.ts | 316 ++++ .../src/test-utils/mock-registry-server.ts | 101 ++ .../src/test-utils/neo4j-setup.ts | 34 + .../src/test-utils/postgres-setup.ts | 46 + .../src/test-utils/shared-test-keys.ts | 34 + .../src/test-utils/test-setup.ts | 7 + .../src/utils/eventEmitter.ts | 3 + .../vault-core-OLDDDD/src/utils/hmac.ts | 31 + .../vault-core-OLDDDD/tsconfig.json | 19 + .../vault-core-OLDDDD/vitest.config.e2e.ts | 33 + .../vault-core-OLDDDD/vitest.config.ts | 34 + 82 files changed, 14310 insertions(+), 1094 deletions(-) create mode 100644 infrastructure/eid-wallet/src/lib/ui/BottomSheet/BottomSheet.svelte create mode 100644 infrastructure/vault-core-OLDDDD/README.md create mode 100644 infrastructure/vault-core-OLDDDD/generate-test-token.js create mode 100644 infrastructure/vault-core-OLDDDD/package.json create mode 100644 infrastructure/vault-core-OLDDDD/src/config/database.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/controllers/NotificationController.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/controllers/ProvisioningController.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/controllers/VerificationController.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/db.service.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/db.service.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/envelope-hash.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/migrations/add-ename-index.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/migrations/add-envelope-operation-log-index.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/migrations/add-user-index.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/migrations/backfill-envelope-operation-logs.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/migrations/migrate-publickey-to-array.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/ontology-platform.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/ontology-platform.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/retry-neo4j.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/schema.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/db/types.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/http/server.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/http/types.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/examples/examples.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/graphql-server.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/graphql-server.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/idiomatic-graphql-api.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/typedefs.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/vault-access-guard.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/protocol/vault-access-guard.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/types/binding-document.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/types/w3id.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/utils/codec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/utils/signer.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/w3id/log-service.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/w3id/log-storage.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/core/w3id/w3id.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/e2e/evault-core.e2e.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/entities/Notification.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/entities/Verification.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/index.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/migrations/1748932757644-migration.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/migrations/1748966722767-migration.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/migrations/1748968097591-migration.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/migrations/1758389959600-migration.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/migrations/1759924736417-migration.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/migrations/1759926271076-migration.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/BindingDocumentService.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/BindingDocumentService.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/NotificationService.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/NotificationService.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/ProvisioningService.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/ProvisioningService.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/VerificationService.spec.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/services/VerificationService.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/test-utils/e2e-setup.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/test-utils/mock-registry-server.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/test-utils/neo4j-setup.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/test-utils/postgres-setup.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/test-utils/shared-test-keys.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/test-utils/test-setup.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/utils/eventEmitter.ts create mode 100644 infrastructure/vault-core-OLDDDD/src/utils/hmac.ts create mode 100644 infrastructure/vault-core-OLDDDD/tsconfig.json create mode 100644 infrastructure/vault-core-OLDDDD/vitest.config.e2e.ts create mode 100644 infrastructure/vault-core-OLDDDD/vitest.config.ts diff --git a/infrastructure/eid-wallet/src/lib/global/controllers/key.ts b/infrastructure/eid-wallet/src/lib/global/controllers/key.ts index b17349010..277da40a8 100644 --- a/infrastructure/eid-wallet/src/lib/global/controllers/key.ts +++ b/infrastructure/eid-wallet/src/lib/global/controllers/key.ts @@ -16,6 +16,12 @@ type PersistedContext = { lastUsed: string; }; +type HardwareFallbackEvent = { + keyId: string; + context: KeyServiceContext; + originalError: unknown; +}; + const CONTEXTS_KEY = "keyService.contexts"; const READY_KEY = "keyService.ready"; @@ -24,6 +30,9 @@ export class KeyService { #managerCache = new Map(); #contexts = new Map(); #ready = false; + #onHardwareFallback: + | ((event: HardwareFallbackEvent) => Promise | void) + | null = null; constructor(store: Store) { this.#store = store; @@ -176,16 +185,70 @@ export class KeyService { ); } - console.log("=".repeat(70)); - const signature = await manager.signPayload(keyId, payload); - console.log( - `✅ [KeyService] Signature created: ${signature.substring(0, 50)}...`, - ); - console.log(`Signature length: ${signature.length} chars`); - console.log("=".repeat(70)); + const cacheKey = this.#getCacheKey(keyId, context); + try { + console.log("=".repeat(70)); + const signature = await manager.signPayload(keyId, payload); + console.log( + `✅ [KeyService] Signature created: ${signature.substring(0, 50)}...`, + ); + console.log(`Signature length: ${signature.length} chars`); + console.log("=".repeat(70)); - await this.#touchContext(this.#getCacheKey(keyId, context), manager); - return signature; + await this.#touchContext(cacheKey, manager); + return signature; + } catch (signError) { + if (managerType !== "hardware") { + throw signError; + } + + console.warn( + "[KeyService] Hardware signing failed; falling back to software key", + { + keyId, + context, + error: + signError instanceof Error + ? signError.message + : String(signError), + }, + ); + + const softwareManager = await KeyManagerFactory.getKeyManager({ + keyId, + useHardware: false, + preVerificationMode: false, + }); + + const softwareKeyExists = await softwareManager.exists(keyId); + if (!softwareKeyExists) { + await softwareManager.generate(keyId); + } + + const fallbackSignature = await softwareManager.signPayload( + keyId, + payload, + ); + + this.#managerCache.set(cacheKey, softwareManager); + await this.#persistContext( + cacheKey, + softwareManager, + keyId, + context, + ); + await this.#runHardwareFallbackCallback({ + keyId, + context, + originalError: signError, + }); + + console.log( + `✅ [KeyService] Fallback signature created: ${fallbackSignature.substring(0, 50)}...`, + ); + console.log("=".repeat(70)); + return fallbackSignature; + } } async verifySignature( @@ -266,4 +329,26 @@ export class KeyService { await this.#store.delete(READY_KEY); this.#ready = false; } + + setHardwareFallbackHandler( + handler: + | ((event: HardwareFallbackEvent) => Promise | void) + | null, + ): void { + this.#onHardwareFallback = handler; + } + + async #runHardwareFallbackCallback( + event: HardwareFallbackEvent, + ): Promise { + if (!this.#onHardwareFallback) return; + try { + await this.#onHardwareFallback(event); + } catch (callbackError) { + console.error( + "[KeyService] Hardware fallback callback failed:", + callbackError, + ); + } + } } diff --git a/infrastructure/eid-wallet/src/lib/global/state.ts b/infrastructure/eid-wallet/src/lib/global/state.ts index d161881a0..aa9d92074 100644 --- a/infrastructure/eid-wallet/src/lib/global/state.ts +++ b/infrastructure/eid-wallet/src/lib/global/state.ts @@ -50,6 +50,33 @@ export class GlobalState { this.#walletSdkAdapter, ); this.notificationService = NotificationService.getInstance(); + + this.keyService.setHardwareFallbackHandler( + async ({ keyId, context, originalError }) => { + console.warn( + "[GlobalState] Hardware signing fallback triggered; syncing software public key", + { + keyId, + context, + error: + originalError instanceof Error + ? originalError.message + : String(originalError), + }, + ); + + try { + const vault = await this.vaultController.vault; + if (!vault?.ename) return; + await this.vaultController.syncPublicKey(vault.ename); + } catch (syncError) { + console.error( + "[GlobalState] Failed to sync fallback public key:", + syncError, + ); + } + }, + ); } /** diff --git a/infrastructure/eid-wallet/src/lib/ui/BottomSheet/BottomSheet.svelte b/infrastructure/eid-wallet/src/lib/ui/BottomSheet/BottomSheet.svelte new file mode 100644 index 000000000..5e1e4f624 --- /dev/null +++ b/infrastructure/eid-wallet/src/lib/ui/BottomSheet/BottomSheet.svelte @@ -0,0 +1,55 @@ + + +{#if isOpen} + + +{/if} diff --git a/infrastructure/eid-wallet/src/lib/ui/CameraPermissionDialog/CameraPermissionDialog.svelte b/infrastructure/eid-wallet/src/lib/ui/CameraPermissionDialog/CameraPermissionDialog.svelte index d7b8f2e00..832062126 100644 --- a/infrastructure/eid-wallet/src/lib/ui/CameraPermissionDialog/CameraPermissionDialog.svelte +++ b/infrastructure/eid-wallet/src/lib/ui/CameraPermissionDialog/CameraPermissionDialog.svelte @@ -1,5 +1,5 @@ -
@@ -96,4 +91,4 @@ function handleSwipe(value: boolean | undefined) { {/if}
- + diff --git a/infrastructure/eid-wallet/src/lib/ui/index.ts b/infrastructure/eid-wallet/src/lib/ui/index.ts index 8619822ef..a4cf93018 100644 --- a/infrastructure/eid-wallet/src/lib/ui/index.ts +++ b/infrastructure/eid-wallet/src/lib/ui/index.ts @@ -1,4 +1,5 @@ export { default as Drawer } from "./Drawer/Drawer.svelte"; +export { default as BottomSheet } from "./BottomSheet/BottomSheet.svelte"; export { default as InputPin } from "./InputPin/InputPin.svelte"; export { default as ButtonAction } from "./Button/ButtonAction.svelte"; export { default as Selector } from "./Selector/Selector.svelte"; diff --git a/infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte b/infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte index 2168eac9a..8007e8cc2 100644 --- a/infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte +++ b/infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte @@ -7,7 +7,7 @@ import { } from "$env/static/public"; import { Hero, IdentityCard } from "$lib/fragments"; import type { GlobalState } from "$lib/global"; -import { Drawer, Toast } from "$lib/ui"; +import { BottomSheet, Toast } from "$lib/ui"; import * as Button from "$lib/ui/Button"; import { capitalize } from "$lib/utils"; import { @@ -614,9 +614,9 @@ onDestroy(() => {
-
{ Share
-
+ +import { BottomSheet } from "$lib/ui"; import * as Button from "$lib/ui/Button"; import { QrCodeIcon } from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/svelte"; @@ -28,10 +29,12 @@ $: if (internalOpen !== lastReportedOpen) { {#if internalOpen} -
-
+ +

Code scanned!

-

+

Please review the connection details below.

@@ -64,7 +67,7 @@ $: if (internalOpen !== lastReportedOpen) {
Platform Name
@@ -79,7 +82,7 @@ $: if (internalOpen !== lastReportedOpen) {
Website URL
@@ -163,7 +166,7 @@ $: if (internalOpen !== lastReportedOpen) { {#if isSigningRequest === false}
-

+

After confirmation, you may return to {platform} and continue there @@ -172,5 +175,5 @@ $: if (internalOpen !== lastReportedOpen) { {/if}

-
+ {/if} diff --git a/infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte b/infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte index bf198e5a8..0a27c8b8a 100644 --- a/infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte +++ b/infrastructure/eid-wallet/src/routes/(app)/scan-qr/components/LoggedInDrawer.svelte @@ -1,4 +1,5 @@ {#if internalOpen} -