mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
Same pattern as ~/work/lux/exchange/pkgs/config/src/brand.ts. Replaces the
BRAND_PACKAGE env-var trick from wallet-legacy with a cleaner runtime
overlay: brand.json ships in the image, K8s ConfigMap overlays at deploy
time, no source fork required.
pkgs/brand/
src/index.ts — BrandConfig interface, mutable `brand` singleton,
loadBrandConfig(), getBootnodeRpcUrl(), getBrandUrl().
brand.json — Lux Wallet defaults (chains 96369/96368/200200/...).
package.json — @luxfi/wallet-brand workspace pkg.
apps/web/
vite.config.ts — copyBrandJson plugin: pkgs/brand/brand.json →
public/brand.json (dev) and dist/brand.json (build).
src/main.tsx — loadBrandConfig() before React renders.
src/App.tsx — read brand.walletName / brand.description.
White-labels (<tenant>, Zoo, Pars) override /brand.json via ConfigMap.
Theme tokens flow as CSS custom properties (--accent1, --surface1, ...) so
no React tree change is needed for a brand swap.
Bootnode RPC pattern: getBootnodeRpcUrl(chainId) defaults to
https://<gatewayDomain>/v1/rpc/<chainId> with rpc[<chainId>] overrides.
No Quicknode, no Alchemy direct.
13 lines
254 B
JSON
13 lines
254 B
JSON
{
|
|
"extends": "../../tsconfig.base.json",
|
|
"include": ["src/**/*.ts"],
|
|
"exclude": ["node_modules"],
|
|
"compilerOptions": {
|
|
"moduleResolution": "Bundler",
|
|
"lib": ["dom", "esnext"],
|
|
"noEmit": true,
|
|
"types": [],
|
|
"rootDir": "."
|
|
}
|
|
}
|