mirror of
https://github.com/luxfi/wallet.git
synced 2026-07-27 03:37:41 +00:00
f028efd393c3ecdd761d65339deaae06d258e5bd
Settings sub-router (`/settings/*`) with eight screens:
Settings.tsx — top-level menu
Networks.tsx — per-chain RPC override (HTTPS-only, persisted)
Security.tsx — PIN change, biometric toggle, auto-lock 1/5/15/60/never
Backup.tsx — PIN re-auth → reveal mnemonic → 30s auto-redact + ack
Language.tsx — 10 locales, en default
Theme.tsx — system / dark / light
Currency.tsx — USD / EUR / JPY / GBP / CHF / CAD
About.tsx — VERSION + /.upstream-sha + GPL-3 + brand legal links
Signing modal — global tx confirmation triggered by Send / Swap /
Bridge / dApps before broadcast:
SigningModal.tsx — backdrop + ESC + reject-on-close
TxSummary.tsx — from / to / amount / gas / chain + ContractDecode
(local ABI + opt-in 4byte fallback)
RiskIndicator.tsx — green / yellow / red heuristics
(known contract → green, MAX_UINT approve → yellow,
unverified contract → red)
useSigningModal.ts — hook + imperative API; promise-resolving queue,
single in-flight request enforced
State (`store/settings.ts`):
{ networks: { [chainId]: { rpcOverride } },
security: { biometric, autoLockMin },
locale, theme, currency }
Persisted via zustand `persist` middleware, partialize boundary
excludes nothing (pure UI prefs, no secrets).
State (`store/signing.ts`):
Single-slot queue keyed by `pending`. `open(tx)` returns
`Promise<{approved, reason?}>`. `beforeunload` rejects pending so
caller awaits unwind cleanly.
Wired at app root: `App.tsx` mounts `<SigningModal />` lazily inside
`<Suspense>` so the modal is reachable from any slice but stays out
of the auth bootstrap bundle.
Constraints honoured:
- ▼ brand defaults via `lib/brand.ts` + `getBootnodeRpcUrl()`,
no empty-string URLs, white-label-ready.
- Mnemonic reveal: PIN re-auth required, 30s auto-redact timer,
overwrites on unmount, never logged or auto-clipboarded.
- Risk heuristics never block; user always confirms.
- Currency conversions through `https://${brand.gatewayDomain}/v1/prices`
with 30s in-memory cache, no calldata leaks.
Build: 23.0 KB settings chunk (6.2 KB gzipped), 13.9 KB SigningModal
chunk (4.8 KB gzipped). Total dist 7.6 MB.
Description
Open Source Lux DeFi Wallet.
187 MiB
Languages
TypeScript
88%
Swift
4.2%
Kotlin
4.1%
JavaScript
1.2%
Go
0.8%
Other
1.6%