Skip to content

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

Closed
islandbitcoin wants to merge 1 commit into
feat/fygarofrom
eng-465-fold-bridge-flag
Closed

feat(flags): gate Bridge top-up/KYC queries behind bridgeTopupEnabled (ENG-465)#658
islandbitcoin wants to merge 1 commit into
feat/fygarofrom
eng-465-fold-bridge-flag

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Folds the ENG-465 client kill switch into the #621 epic (feat/fygaro).

What

  • feature-flags-context.tsx: new bridgeTopupEnabled Remote Config flag (default OFF; on for Local)
  • TopupCashout.tsx + AccountType.tsx: skip: !bridgeTopupEnabled on useBridgeKycStatusQuery / useBridgeExternalAccountsQuery + guard the on-focus refetch

Why

These bridge queries fire on mount/focus for every level≥1 user. With only the backend bridge.enabled toggle, disabling bridge makes resolvers throw → client errors. This adds a client-side kill switch so bridge stays dark (graceful) until flipped on for the beta cohort.

Scope note

USDT gating is intentionally omitted — the USDT cutover is the deliberate default (flash#413), so cashWalletCutover exists on main and needs no client skip. Supersedes the earlier ENG-465 PRs #656/#657, which targeted sibling branches not in this epic.

Local typecheck not run (isolated worktree); relying on CI.

🤖 Generated with Claude Code

… (ENG-465)

Folds the ENG-465 client kill switch into the cashouts/topups/transfers epic
(#621). The Bridge KYC + external-accounts queries fire on mount/focus for
every level>=1 user; without a client flag the only way to disable bridge is
the backend bridge.enabled, which makes resolvers throw (client errors) rather
than degrade gracefully. Add a bridgeTopupEnabled Remote Config flag (default
OFF) and Apollo `skip:` the queries + focus refetch so bridge stays dark until
flipped on for the beta cohort.

USDT gating intentionally omitted: the USDT cutover is the deliberate default
(flash#413), so the cashWalletCutover field will exist on main and needs no
client skip.

ENG-465.

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

Copy link
Copy Markdown
Contributor Author

Folded into #621 as commit be5c16120.

I kept the Remote Config flag idea (bridgeTopupEnabled) and tightened the behavior: when the flag is off, Bridge KYC/external-account queries are skipped and Bridge top-up/cash-out/KYC entry points are hidden, so users cannot click into disabled backend resolvers. Local still forces the flag on for UAT/dev.

Closing this PR as superseded by #621.

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