fix(cw_monero): wait a bit before refreshing txlist so it appears (#2275)
cyan committed
May 17, 2025 at 01:03 UTC
1c7dd02a53ad03f8ddbe5e8fd6098f6a4d1797df
1 file changed
+10
-2
cw_monero/lib/pending_monero_transaction.dart
+10
-2
@@ -1,3 +1,5 @@
1
+import 'dart:async';
2
+
3
import 'package:cw_monero/api/account_list.dart';
4
import 'package:cw_monero/api/structs/pending_transaction.dart';
5
import 'package:cw_monero/api/transaction_history.dart'
@@ -56,8 +58,11 @@ class PendingMoneroTransaction with PendingTransaction {
58
59
rethrow;
60
}
59
- await wallet.fetchTransactions();
61
storeSync(force: true);
62
+ unawaited(() async {
63
+ await Future.delayed(const Duration(milliseconds: 250));
64
+ await wallet.fetchTransactions();
65
+ }());
66
}
67
68
@override
@@ -66,8 +71,11 @@ class PendingMoneroTransaction with PendingTransaction {
71
final ret = monero_transaction_history.commitTransactionFromPointerAddress(
72
address: pendingTransactionDescription.pointerAddress,
73
useUR: true);
69
- await wallet.fetchTransactions();
74
storeSync(force: true);
75
+ unawaited(() async {
76
+ await Future.delayed(const Duration(milliseconds: 250));
77
+ await wallet.fetchTransactions();
78
+ }());
79
return ret;
80
} catch (e) {
81
final message = e.toString();