Skip to content

Commit aad4b07

Browse files
authored
Fix/social binding bug (#911)
* chore: fix binding bug * chore: remove debug section * chore: format * chore: remove debug logs from social binding flow
1 parent b3b1a01 commit aad4b07

3 files changed

Lines changed: 2 additions & 29 deletions

File tree

infrastructure/eid-wallet/src-tauri/gen/android/key-shitore.properties

Lines changed: 0 additions & 3 deletions
This file was deleted.

infrastructure/eid-wallet/src/routes/(auth)/onboarding/+page.svelte

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
} from "$env/static/public";
99
import { Hero } from "$lib/fragments";
1010
import { GlobalState } from "$lib/global";
11-
import NotificationService from "$lib/services/NotificationService";
1211
import { pendingRecovery } from "$lib/stores/pendingRecovery";
1312
import { ButtonAction } from "$lib/ui";
1413
import { capitalize, getCanonicalBindingDocString } from "$lib/utils";
@@ -19,9 +18,6 @@ import { Shadow } from "svelte-loading-spinners";
1918
import { v4 as uuidv4 } from "uuid";
2019
import { provision } from "wallet-sdk";
2120
22-
let pushToken = $state<string | undefined>(undefined);
23-
let pushTokenError = $state<string | undefined>(undefined);
24-
let pushTokenLoading = $state(true);
2521
const ANONYMOUS_VERIFICATION_CODE = "d66b7138-538a-465f-a6ce-f6985854c3f4";
2622
const KEY_ID = "default";
2723
@@ -735,18 +731,6 @@ const handleEnamePassphraseRecovery = async () => {
735731
};
736732
737733
onMount(async () => {
738-
// Fetch push notification token for display (Android/iOS)
739-
try {
740-
pushToken = await NotificationService.getInstance().getPushToken();
741-
if (!pushToken)
742-
pushTokenError = "No token (desktop or permission denied)";
743-
} catch (e) {
744-
pushTokenError =
745-
e instanceof Error ? e.message : "Failed to get push token";
746-
} finally {
747-
pushTokenLoading = false;
748-
}
749-
750734
// Detect upgrade mode from query param
751735
const url = new URL(window.location.href);
752736
if (url.searchParams.get("upgrade") === "1") {
@@ -762,16 +746,6 @@ onMount(async () => {
762746
class="min-h-svh px-[5vw] flex flex-col justify-between"
763747
style="padding-top: max(4svh, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom));"
764748
>
765-
<section class="mb-4 p-2 rounded bg-gray-100 text-xs">
766-
<p class="font-medium text-gray-600 mb-1">Push token (FCM/APNs):</p>
767-
{#if pushTokenLoading}
768-
<span class="text-gray-500">Loading...</span>
769-
{:else if pushToken}
770-
<code class="block break-all text-gray-800">{pushToken}</code>
771-
{:else}
772-
<span class="text-amber-600">{pushTokenError ?? ""}</span>
773-
{/if}
774-
</section>
775749
<article class="flex justify-center mb-4">
776750
<img
777751
class="w-[88vw] h-[39svh]"

infrastructure/evault-core/src/services/BindingDocumentService.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ export class BindingDocumentService {
220220
const expectedHash = computeBindingDocumentHash(docToVerify);
221221
const hasLegacyHashSignature = input.ownerSignature.signature === expectedHash;
222222
const isProvisionerSigner = /^https?:\/\//.test(input.ownerSignature.signer);
223+
223224
const hasValidUserSignature =
224225
!hasLegacyHashSignature &&
225226
!isProvisionerSigner &&
@@ -228,6 +229,7 @@ export class BindingDocumentService {
228229
input.ownerSignature.signature,
229230
docToVerify,
230231
));
232+
231233
if (!hasLegacyHashSignature && !isProvisionerSigner && !hasValidUserSignature) {
232234
throw new ValidationError("Invalid owner signature");
233235
}

0 commit comments

Comments
 (0)