Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions infrastructure/eid-wallet/src/lib/utils/socialBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading