feat(transfer): gate transfer entry points on backend topup/cashout/bridge flags#664
Merged
Conversation
…ridge 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>
…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>
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
Depends on lnflash/flash#429 (exposes
cashoutEnabled/bridgeEnabledinglobals; must be deployed before these flags take effect — until then the fields must exist in the schema for the query to succeed).useTransferFlagshook — queriesglobals { topupEnabled cashoutEnabled bridgeEnabled }(cache-and-network). The backend flags are the source of truth; the Firebase remote-configbridgeTopupEnabledflag is kept ANDed in as a client-side kill switch for bridge.topupEnabled || bridgeEnabled(unchanged behavior, new flag source for bridge)cashoutEnabled || bridgeEnabled(previously always shown)cashoutEnabled(previously ungated)checkBridgeKycgated on backendbridgeEnabled&& Firebase kill switch (previously Firebase only)public-schema.graphqlupdated with the two new Globals fields; codegen outputs regenerated.Flag → UI matrix
Test plan
yarn check-codepasses locally (tsc, translations, codegen drift, graphql-inspector).🤖 Generated with Claude Code