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) } `; 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(