Skip to content

feat: devnet build configuration#180

Merged
WiktorStarczewski merged 2 commits intomainfrom
wiktor-devnet-setup
Apr 10, 2026
Merged

feat: devnet build configuration#180
WiktorStarczewski merged 2 commits intomainfrom
wiktor-devnet-setup

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

Summary

  • Adds MIDEN_NETWORK env variable to control build-time network targeting (default: testnet)
  • yarn build:devnet produces a devnet extension with blue/gray branding, devnet endpoints, and "Miden Wallet (Devnet)" manifest name
  • Replaces all hardcoded brand color hex values (#FF5500, #EE622F, etc.) with network-conditional constants from src/utils/brand-colors.ts
  • Adds 14 devnet SVG icon variants and conditional icon selection in Settings, Onboarding, Unlock, and BiometricUnlock screens

New build scripts

  • yarn build:devnet — extension
  • yarn dev:devnet — extension dev watch
  • yarn build:mobile:devnet — mobile
  • yarn build:desktop:devnet — desktop

How it works

One env variable (MIDEN_NETWORK) drives everything:

  • Webpack EnvironmentPlugin injects it into all 7 build configs
  • constants.ts reads it to set DEFAULT_NETWORK → controls endpoints
  • tailwind.config.ts reads process.env.MIDEN_NETWORK → controls CSS colors
  • brand-colors.ts reads DEFAULT_NETWORK → controls inline/SVG colors
  • webpack.public.config.js transform → controls manifest name

A plain yarn build (no env var) is unchanged — testnet by default.

Test plan

  • yarn build produces testnet extension (orange, "Miden Wallet")
  • yarn build:devnet produces devnet extension (blue/gray, "Miden Wallet (Devnet)")
  • yarn test — 1639 tests passing
  • yarn lint — clean (0 warnings)
  • Load both extensions side-by-side and verify visual difference

Build-time configurable devnet support: set MIDEN_NETWORK=devnet to
produce a devnet wallet with blue/gray branding, devnet endpoints,
and "(Devnet)" manifest name. Testnet remains the default.

New scripts: build:devnet, dev:devnet, build:mobile:devnet, build:desktop:devnet
@WiktorStarczewski WiktorStarczewski added the no changelog Skip changelog check for trivial changes label Apr 10, 2026
@WiktorStarczewski WiktorStarczewski merged commit b45c6a2 into main Apr 10, 2026
10 checks passed
@WiktorStarczewski WiktorStarczewski deleted the wiktor-devnet-setup branch April 10, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog Skip changelog check for trivial changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant