feat(topup): gate card + bank-transfer top-up behind topupEnabled#661
Closed
islandbitcoin wants to merge 1 commit into
Closed
feat(topup): gate card + bank-transfer top-up behind topupEnabled#661islandbitcoin wants to merge 1 commit into
islandbitcoin wants to merge 1 commit into
Conversation
Consumes the new backend Globals.topupEnabled feature flag (lnflash/flash #421) to show/hide the two top-up entry points the mobile owns: - credit-card (Fygaro webview) - bank-transfer-to-support When topupEnabled is false, both are removed from the top-up options menu in TopupCashout. International bank top-up is intentionally left in place — it flows through the bridge and is gated server-side by the bridge feature flag. - add `query globals { globals { topupEnabled } }` and consume via useGlobalsQuery (cache-and-network so a flag flip is picked up promptly) - add Globals.topupEnabled to the committed public-schema.graphql - regenerated generated.ts / generated.gql Depends on backend #421 (Globals.topupEnabled) being deployed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consumes the new backend
Globals.topupEnabledfeature flag (lnflash/flash #421) to show/hide the two top-up entry points the mobile owns:When
topupEnabledisfalse, both are removed from the top-up options menu inTopupCashout. International bank top-up stays in place — it flows through the bridge and is gated server-side bybridge.enabled, so it's controlled independently.This lets top-up be killed/enabled via backend YAML + rolling restart (the v0.6.0
KILL_MONEYSOP) with no app release.Changes
app/screens/topup-cashout-flow/TopupCashout.tsxquery globals { globals { topupEnabled } }, consume viauseGlobalsQuery(cache-and-network), conditionally include card + bank-transfer optionsapp/graphql/public-schema.graphqlGlobals.topupEnabled: Boolean!(mirrors backend SDL)app/graphql/generated.ts,generated.gqlyarn dev:codegenBehavior
topupEnableddefaults tofalseclient-side (?? false), so if the field/flag is missing or the backend is old, the card + bank entries are hidden (fail-safe).TopupDetails → CardPayment/BankTransferis only reachable through the gated menu, so no separate gating is needed there (verified: no other entry points navigate into those screens).Verification
yarn tsc:check✅yarn graphql-check✅ (all documents valid)eslint✅Dependency / sequencing
Depends on backend #421 (
Globals.topupEnabled) being merged + deployed. Until thentopupEnabledresolves tofalse(entries hidden) — which is the intended default-OFF state anyway. Safe to merge in either order; the flag only does something once the backend serves it.🤖 Generated with Claude Code