feat(graphql): expose cashoutEnabled and bridgeEnabled in globals#429
Merged
Conversation
The mobile app needs to know the instance-wide cashout and bridge flag state to hide/disable transfer entry points, but globals only exposed topupEnabled. Cashout.Enabled and BridgeConfig.enabled were config-only and enforced server-side by erroring. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Companion mobile PR: lnflash/flash-mobile#664 |
bobodread876
approved these changes
Jul 4, 2026
islandbitcoin
added a commit
to lnflash/flash-mobile
that referenced
this pull request
Jul 4, 2026
…ridge flags (#664) * feat(transfer): gate transfer entry points on backend topup/cashout/bridge flags - New useTransferFlags hook queries globals { topupEnabled cashoutEnabled bridgeEnabled }; backend is the source of truth, with the Firebase bridgeTopupEnabled remote-config flag kept ANDed in as a client-side kill switch for bridge. - Home screen: Transfer button hidden when all three flags are off. - Transfer screen: Top up shows iff topup or bridge is enabled; Settle shows iff cashout or bridge is enabled; JMD bank option now gated on cashoutEnabled; bridge options and KYC/external-account queries gated on backend bridgeEnabled instead of Firebase alone. - Vendored public-schema.graphql updated with the new Globals fields (backend PR: lnflash/flash#429); regenerated codegen outputs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(test): mock @react-native-firebase/remote-config; reword comment for typos use-transfer-flags exports through the @app/hooks barrel and imports feature-flags-context, which calls getRemoteConfig() at module load — six jest suites that reach the barrel died with 'Native module RNFBAppModule not found'. Adds the missing remote-config auto-mock alongside the existing analytics/crashlytics/messaging mocks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Dread <dread@example.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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
cashoutEnabledandbridgeEnabledto the publicGlobalsGraphQL type, alongside the existingtopupEnabled.Cashout.Enabled(cashout.enabledyaml) andBridgeConfig.enabled(bridge.enabledyaml) — same config the server already enforces viacheckBridgeEnabled/ cashout guards.schema.graphqlandsupergraph.graphqlviayarn write-sdl.Why
The mobile app needs to hide/disable the Transfer entry points (home-screen button, top-up/settle options) when the topup/cashout/bridge flags are off on an instance (e.g. TEST cluster with all flags defaulted off per #425). Today only
topupEnabledis queryable; cashout and bridge state are invisible to clients, so buttons show and then fail server-side.Companion flash-mobile PR consumes these fields (link to follow).
Test plan
yarn write-sdl(includes fullyarn build) passes; SDL/supergraph diffs are additive only.{ globals { topupEnabled cashoutEnabled bridgeEnabled } }on TEST after deploy and confirm values track the instance yaml flags.🤖 Generated with Claude Code