mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-03 12:24:19 +01:00
Fixes for monero transaction history updates.
This commit is contained in:
@@ -10,15 +10,17 @@ abstract class TransactionHistoryBase<TransactionType extends TransactionInfo> {
|
||||
|
||||
bool _isUpdating;
|
||||
|
||||
@action
|
||||
Future<void> update() async {
|
||||
if (_isUpdating) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
_isUpdating = false;
|
||||
transactions.addAll(await fetchTransactions());
|
||||
_isUpdating = true;
|
||||
final _transactions = await fetchTransactions();
|
||||
_transactions.forEach((key, value) => transactions[key] = value);
|
||||
_isUpdating = false;
|
||||
} catch (e) {
|
||||
_isUpdating = false;
|
||||
rethrow;
|
||||
|
||||
Reference in New Issue
Block a user