mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
fix(cw_monero): wait a bit before refreshing txlist so it appears (#2275)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:cw_monero/api/account_list.dart';
|
||||
import 'package:cw_monero/api/structs/pending_transaction.dart';
|
||||
import 'package:cw_monero/api/transaction_history.dart'
|
||||
@@ -56,8 +58,11 @@ class PendingMoneroTransaction with PendingTransaction {
|
||||
|
||||
rethrow;
|
||||
}
|
||||
await wallet.fetchTransactions();
|
||||
storeSync(force: true);
|
||||
unawaited(() async {
|
||||
await Future.delayed(const Duration(milliseconds: 250));
|
||||
await wallet.fetchTransactions();
|
||||
}());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -66,8 +71,11 @@ class PendingMoneroTransaction with PendingTransaction {
|
||||
final ret = monero_transaction_history.commitTransactionFromPointerAddress(
|
||||
address: pendingTransactionDescription.pointerAddress,
|
||||
useUR: true);
|
||||
await wallet.fetchTransactions();
|
||||
storeSync(force: true);
|
||||
unawaited(() async {
|
||||
await Future.delayed(const Duration(milliseconds: 250));
|
||||
await wallet.fetchTransactions();
|
||||
}());
|
||||
return ret;
|
||||
} catch (e) {
|
||||
final message = e.toString();
|
||||
|
||||
Reference in New Issue
Block a user