mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
fix(cw_monero): wait a bit before refreshing txlist so it appears (#2275)
This commit is contained in:
parent
914561716d
commit
1c7dd02a53
1 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue