Skip to content

feat(flags): gate Bridge top-up/KYC queries behind bridgeTopupEnabled (ENG-465)#656

Closed
islandbitcoin wants to merge 1 commit into
fix/bridge-kyc-selfiefrom
eng-465-bridge-flag-gating
Closed

feat(flags): gate Bridge top-up/KYC queries behind bridgeTopupEnabled (ENG-465)#656
islandbitcoin wants to merge 1 commit into
fix/bridge-kyc-selfiefrom
eng-465-bridge-flag-gating

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

What

Adds a bridgeTopupEnabled Firebase Remote Config flag (default OFF) and gates the Bridge GraphQL queries behind it with Apollo skip:.

  • feature-flags-context.tsx: new bridgeTopupEnabled flag (default off; on for Local instance, mirroring deviceAccountEnabled)
  • TopupCashout.tsx: skip: !bridgeTopupEnabled on useBridgeKycStatusQuery + useBridgeExternalAccountsQuery; guard the on-focus refetch
  • AccountType.tsx: same for useBridgeKycStatusQuery

Why (ENG-465, audit P0)

These queries fire on mount/focus for every level≥1 user. If the app reaches users before the backend exposes bridgeKycStatus / bridgeExternalAccounts, they hit app-wide GraphQL validation errors. The flag lets us keep the UI dark until the backend is ready, and keeps the FE flag in sync with the backend bridge.enabled.

Toggle behavior

  • OFF (default): queries never fire; no refetch on focus; existing UI renders without bridge data (already null-safe).
  • ON: unchanged from today.

Verification

Local full typecheck not run (isolated worktree has no node_modules) — relying on CI. Change is minimal and follows the existing skip: !deviceAccountEnabled pattern; skip is a standard Apollo query option.

🤖 Generated with Claude Code

… (ENG-465)

The Bridge KYC + external-accounts queries fire on mount/focus for every
level>=1 user. If the app ships before the backend exposes these fields, all
eligible users get GraphQL errors. Add a bridgeTopupEnabled Remote Config flag
(default OFF) and Apollo `skip:` the queries + refetch when it's off, so the
new bridge fields are never queried until the flag is turned on.

ENG-465. Mirrors the existing deviceAccountEnabled skip pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear

linear Bot commented Jun 29, 2026

Copy link
Copy Markdown

ENG-465

@islandbitcoin

Copy link
Copy Markdown
Contributor Author

Superseded by #658, which folds the same bridge kill-switch into the #621 epic (feat/fygaro). #656/#657 targeted sibling branches (fix/bridge-kyc-selfie, feat/usdt-display-as-usd) that are not part of the epics being merged. USDT query gating dropped: the USDT cutover is the intended default (flash#413).

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.

1 participant