Problem
The app's security state is not durable. security.store.ts has zero
persistence (#39) — isLocked, failedAttempts, and biometricCheckDone
all reset to defaults on restart, so biometric lockout and idle auto-lock are
bypassed simply by killing and reopening the app. Sign-out is also
incomplete: settings.handleSignOut() clears user/auth state but never
disconnects the WalletConnect v2 session (#41), leaving an active session
after the user believes they are signed out.
Before Starting
Read ALL of these before writing any code:
- context/architecture-context.md
- context/code-standards.md
What To Build
A hardware-backed, persisted security vault:
- Persist security state to encrypted storage (expo-secure-store / Keychain /
Keystore) so lock status and failed-attempt counters survive restart.
- Enforce failed-attempt lockout with backoff and idle auto-lock that cannot
be reset by relaunching the app.
- Gate protected screens behind a biometric check that re-runs on cold start
and resume.
- Make sign-out a full teardown: revoke the WalletConnect v2 session and
clear wallet, auth, and loan stores atomically.
Files To Touch
- src/security/security.store.ts
- services/wallet.service.ts (session teardown)
- app/settings.tsx (
handleSignOut)
- src/security/* (biometric gate, secure storage)
Acceptance Criteria
Mandatory Checks Before Opening PR
Problem
The app's security state is not durable.
security.store.tshas zeropersistence (#39) —
isLocked,failedAttempts, andbiometricCheckDoneall reset to defaults on restart, so biometric lockout and idle auto-lock are
bypassed simply by killing and reopening the app. Sign-out is also
incomplete:
settings.handleSignOut()clears user/auth state but neverdisconnects the WalletConnect v2 session (#41), leaving an active session
after the user believes they are signed out.
Before Starting
Read ALL of these before writing any code:
What To Build
A hardware-backed, persisted security vault:
Keystore) so lock status and failed-attempt counters survive restart.
be reset by relaunching the app.
and resume.
clear wallet, auth, and loan stores atomically.
Files To Touch
handleSignOut)Acceptance Criteria
Mandatory Checks Before Opening PR