feat: add test mode autofill for onboarding forms and dashboard testmode banner#11
Merged
Conversation
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.
Description
Expose
livemodeon PublicConfig so the web app can detect test vs live mode from a single source of truth. Add reusable TestModeBannerComponent and FillTestData() methods to person and wallet forms for one-click autofill during onboarding. Show a persistent test mode bar on the dashboard. Also fixes SOLANA_CURRENCY casing inconsistency (USDC → usdc) to match backend convention, and refactors add-funds-panel to use the shared ConfigService.IsTestMode() instead of inferring from explorer URLs.Type of Change
How Was This Tested?
Test mode banner correctly displays, and test mode auto fill buttons also correctly display when LIVEMODE is false, and are not present when LIVEMODE is true.
Breaking Changes
PublicConfignow includeslivemode(API + Web)The
GET /v1/configendpoint now returns alivemode: booleanfield on thePublicConfigobject. The web app depends on this field to show test mode UI (autofill banners, dashboard test mode bar). The API and web app must be deployed together — the frontend will not show test mode indicators if paired with an older API that omitslivemode.If you consume the
/v1/configendpoint directly, the new field is additive and should not break existing integrations.SOLANA_CURRENCYcasing change (Web)The frontend constant
SOLANA_CURRENCYchanged from'USDC'(uppercase) to'usdc'(lowercase) to match the backend convention. Any wallets created through the onboarding UI will now storecurrency: 'usdc'instead ofcurrency: 'USDC'. Existing wallet records with uppercase'USDC'are unaffected — the currency field on wallets is not used in any backend comparisons.AddFundsPanelComponent.IsTestMode()(Web — internal)Test mode detection in the add-funds panel now uses
ConfigService.IsTestMode()instead of checkingexplorer_urlforcluster=devnet. This requiresConfigService.LoadConfig()to have been called before the panel opens (already the case in the normal dashboard flow).Checklist