Problem
After a learner signs and submits a transaction there is no reliable tracking
of its on-chain resolution. loans.store.ts has no persistence (#38), so
simulatedAmount, cached loans, and any pending payment are lost on restart.
If a repayment is submitted while the app is backgrounded or killed, it
disappears from the UI with no way to recover its status. There is no pending
-transaction queue, no status polling, and no reconciliation on resume.
Before Starting
Read ALL of these before writing any code:
- context/architecture-context.md
- context/code-standards.md
What To Build
A durable transaction-tracking layer:
- A persisted pending-transaction queue (Zustand persist / secure storage)
recording each submitted tx hash, type, and target loan.
- Background/foreground status polling against the API until each tx reaches
a terminal state (confirmed / failed / expired), with exponential backoff.
- Reconciliation on app resume: re-check any still-pending tx and update loan
state accordingly, surfacing success/failure to the user.
- Idempotent updates so a tx confirmed while offline is not double-counted.
Files To Touch
- stores/loans.store.ts (persistence)
- src/transactions/* (pending queue + poller)
- services/transactions.service.ts
- relevant screens (pending/confirmed/failed UI)
Acceptance Criteria
Mandatory Checks Before Opening PR
Problem
After a learner signs and submits a transaction there is no reliable tracking
of its on-chain resolution.
loans.store.tshas no persistence (#38), sosimulatedAmount, cached loans, and any pending payment are lost on restart.If a repayment is submitted while the app is backgrounded or killed, it
disappears from the UI with no way to recover its status. There is no pending
-transaction queue, no status polling, and no reconciliation on resume.
Before Starting
Read ALL of these before writing any code:
What To Build
A durable transaction-tracking layer:
recording each submitted tx hash, type, and target loan.
a terminal state (confirmed / failed / expired), with exponential backoff.
state accordingly, surfacing success/failure to the user.
Files To Touch
Acceptance Criteria
Mandatory Checks Before Opening PR