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.
18 lines
332 B
JSON
18 lines
332 B
JSON
{
|
|
"name": "@luxfi/wallet-brand",
|
|
"version": "0.1.0",
|
|
"private": false,
|
|
"license": "GPL-3.0-or-later",
|
|
"main": "src/index.ts",
|
|
"types": "src/index.ts",
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./brand.json": "./brand.json",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"src",
|
|
"brand.json"
|
|
]
|
|
}
|