Description
The app references a service worker (/sw.js) but there's no offline payment queueing — a payment attempted while offline simply fails. This issue adds an offline queue that auto-submits when connectivity returns.
Technical Context
Involves the service worker setup and a new src/lib/offlineQueue.ts. Failed-due-to-network payment attempts are queued (IndexedDB, not localStorage, since payloads may be larger) and a online event listener triggers automatic resubmission, integrating with NetworkStatus.tsx's existing connectivity detection.
Acceptance Criteria
Description
The app references a service worker (
/sw.js) but there's no offline payment queueing — a payment attempted while offline simply fails. This issue adds an offline queue that auto-submits when connectivity returns.Technical Context
Involves the service worker setup and a new
src/lib/offlineQueue.ts. Failed-due-to-network payment attempts are queued (IndexedDB, not localStorage, since payloads may be larger) and aonlineevent listener triggers automatic resubmission, integrating withNetworkStatus.tsx's existing connectivity detection.Acceptance Criteria
NetworkStatus.tsxshows a count of queued pending payments when offline