-
Notifications
You must be signed in to change notification settings - Fork 1
Description
30-second timeout silently stops watching
Note:
Retry button could be ok, customer may take forever to transfer
We should also check history in case there's a big delay
This happened because before we didn't do any checking, relying on manual check by cashier
We could also do a "Checked manually" button instead of "Done"
Could be next PR
_timeoutTimer = Timer(const Duration(seconds: 30), () {
print('[TxWatch] Timeout — gave up waiting for payment');
_txWatch.dispose();
if (mounted) setState(() => _watching = false);
});
After 30s, the watcher stops and the UI changes from "Waiting for payment..." back to a plain "Done" button. The user gets no feedback that monitoring stopped. If the payment arrives at second 31, it's missed. Consider either extending this timeout, showing a "Timed out — tap to retry" message, or re-subscribing on tap.