From 62e5cc4ae6a5bf5644bca8bc0207d485024f70d1 Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Fri, 10 Jul 2026 13:11:51 +0530 Subject: [PATCH 1/2] fix: fixed the social binding decline not working problem. --- infrastructure/eid-wallet/src/lib/utils/socialBinding.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/infrastructure/eid-wallet/src/lib/utils/socialBinding.ts b/infrastructure/eid-wallet/src/lib/utils/socialBinding.ts index fb057b309..4c3ee74ca 100644 --- a/infrastructure/eid-wallet/src/lib/utils/socialBinding.ts +++ b/infrastructure/eid-wallet/src/lib/utils/socialBinding.ts @@ -284,11 +284,13 @@ const ADD_SIGNATURE_MUTATION = ` } `; +// deleteMetaEnvelope returns Boolean! (a scalar) — selecting a subfield on it +// is a GraphQL validation error, which made every delete throw and silently +// no-op (e.g. a declined request never got removed and re-surfaced on the next +// poll). Request the scalar directly, with no selection set. const DELETE_META_ENVELOPE_MUTATION = ` mutation DeleteMetaEnvelope($id: String!) { - deleteMetaEnvelope(id: $id) { - id - } + deleteMetaEnvelope(id: $id) } `; From 4064d623beb4011f4dc4c78e746f8e0da4f52c42 Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Fri, 10 Jul 2026 13:31:49 +0530 Subject: [PATCH 2/2] feat: added a refetch of home data on decline to show the latest number only and reflect declined request. --- .../routes/(app)/main/components/SocialBindingDrawer.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/infrastructure/eid-wallet/src/routes/(app)/main/components/SocialBindingDrawer.svelte b/infrastructure/eid-wallet/src/routes/(app)/main/components/SocialBindingDrawer.svelte index f50a7e3a1..e57f645ab 100644 --- a/infrastructure/eid-wallet/src/routes/(app)/main/components/SocialBindingDrawer.svelte +++ b/infrastructure/eid-wallet/src/routes/(app)/main/components/SocialBindingDrawer.svelte @@ -189,6 +189,12 @@ async function decline() { : `@${vault.ename}`; const gqlUrl = new URL("/graphql", vault.uri).toString(); await deleteSocialBindingDoc(gqlUrl, callerEname, docId); + + // The declined request was counted as a (pending) binding on + // the home screen; now that it's gone, tell the parent to + // re-fetch so the count drops immediately (e.g. 10 → 9) + // instead of staying stale until the next manual refresh. + onbound?.(); } } catch (err) { console.error(