Skip to content

feat: extend scoped query invalidation to /profile and allowance trees - #523

Open
ZacLou wants to merge 2 commits into
conduit-protocol:mainfrom
ZacLou:feat/scoped-invalidation-profile-allowance-448
Open

feat: extend scoped query invalidation to /profile and allowance trees#523
ZacLou wants to merge 2 commits into
conduit-protocol:mainfrom
ZacLou:feat/scoped-invalidation-profile-allowance-448

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses #448

Problem

#431 scoped refreshStreamData to stream/dashboard/transactions. Profile aggregates and the token-allowance gateway state also needed targeted invalidation after a mutation, but weren't in the query key structure.

Changes

lib/query-keys.ts

  • Added extendedQueryKeys with profile.summary(address) and allowance.forToken(owner, token) keys
  • Added invalidateProfileAndAllowance(qc, address, token?) helper that invalidates the profile summary and allowance queries

components/stream/StreamActions.tsx

  • After invalidateStreamMutation, now also calls invalidateProfileAndAllowance so profile and allowance data is refreshed after pause/resume/cancel/withdraw/topup

Usage

import { invalidateProfileAndAllowance } from '@/lib/query-keys';

// After a mutation that changes token balance:
await invalidateStreamMutation(qc, streamAddress);
await invalidateProfileAndAllowance(qc, publicKey);

ZacLou and others added 2 commits September 5, 2026 23:56
conduit-protocol#448)

Adds profile and allowance query keys to the central queryKeys
structure and a invalidateProfileAndAllowance() helper. StreamActions
now calls it after invalidateStreamMutation so profile aggregates and
token-allowance gateway state are refreshed after mutations.

- Extended queryKeys with profile.summary and allowance.forToken
- invalidateProfileAndAllowance(qc, address, token?) helper
- StreamActions calls it after each successful mutation

Addresses conduit-protocol#448
@ZacLou
ZacLou force-pushed the feat/scoped-invalidation-profile-allowance-448 branch from 8aedd63 to bfcab45 Compare September 5, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants