Skip to content

feat: add test mode autofill for onboarding forms and dashboard testmode banner#11

Merged
Benzilla merged 1 commit into
mainfrom
test-autofill
Apr 15, 2026
Merged

feat: add test mode autofill for onboarding forms and dashboard testmode banner#11
Benzilla merged 1 commit into
mainfrom
test-autofill

Conversation

@Benzilla
Copy link
Copy Markdown
Contributor

Description

Expose livemode on 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

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation

How Was This Tested?

  • Unit tests
  • Integration tests
  • Manual testing

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

PublicConfig now includes livemode (API + Web)

The GET /v1/config endpoint now returns a livemode: boolean field on the PublicConfig object. 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 omits livemode.
If you consume the /v1/config endpoint directly, the new field is additive and should not break existing integrations.

SOLANA_CURRENCY casing change (Web)

The frontend constant SOLANA_CURRENCY changed from 'USDC' (uppercase) to 'usdc' (lowercase) to match the backend convention. Any wallets created through the onboarding UI will now store currency: 'usdc' instead of currency: '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 checking explorer_url for cluster=devnet. This requires ConfigService.LoadConfig() to have been called before the panel opens (already the case in the normal dashboard flow).

Checklist

  • Self-reviewed my code
  • No new warnings
  • Existing tests still pass
  • Breaking changes are documented above

@Benzilla Benzilla merged commit 67f260d into main Apr 15, 2026
5 checks passed
@Benzilla Benzilla deleted the test-autofill branch April 15, 2026 13:48
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