completed first web iteration

This commit is contained in:
2025-11-25 20:06:33 +02:00
parent 895925d32f
commit 32b383afa9
41 changed files with 3703 additions and 2613 deletions

View File

@@ -76,15 +76,22 @@ class GatewayController extends ChangeNotifier {
}
Future<void> pollTransaction(String uid) async {
// only poll for 5 minutes
int max = 30;
while (!model.isCancelled) {
max++;
// Check cancellation flag instead of true
// Wait 5 seconds before the next poll
await Future.delayed(const Duration(seconds: 5));
await Future.delayed(const Duration(seconds: 10));
// Check again after delay in case it was cancelled during the delay
if (model.isCancelled) break;
await poll(uid);
if(max > 30) {
model.isCancelled = true;
}
}
}