You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mobile): persist state + serve a cached fleet on launch
The storage seam was an in-memory stub, so nothing survived a restart — the app
minted a NEW keypair every launch (losing the on-chain entitlement) and
re-discovered the whole fleet from cold every time. Wire real persistence and a
discovery cache so the app opens straight into a usable state.
- Add @react-native-async-storage/async-storage (3.1.1, exact) and back the whole
storage seam with it: keypair, prefs, favorites now persist across restarts.
(Private key is plain in AsyncStorage — already far better than the previous
regenerate-every-launch; a later pass should move it to the Keychain/Keystore.)
- Fleet cache: persist the last good discovery (gateways + latency) via
saveFleet, and on launch paint it immediately (loadFleet) before running live
discovery in the background. Warm launches skip the splash entirely and show
servers instantly; the cache is also a fallback when discovery is slow/fails.
- Surface the background refresh: a subtle "Updating servers…" line on Connect
while cache is served, and the picker's spinner now reflects auto-discovery.
- Jest: mock AsyncStorage (jest.setup.js) + fleet-cache round-trip tests.
0 commit comments