Revert "Fix unavailable balance not refreshing after the app got opened (#1920)" (#1925)

This reverts commit d33a901f66.
This commit is contained in:
Omar Hatem
2025-01-02 18:02:44 +02:00
committed by GitHub
parent f2bdb32463
commit 0ebfd671f9
2 changed files with 1 additions and 6 deletions
-4
View File
@@ -503,7 +503,6 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
}
Future<void> updateUnspent() async {
await transaction_history.txHistoryMutex.acquire();
try {
refreshCoins(walletAddresses.account!.id);
@@ -532,7 +531,6 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
if (unspentCoinsInfo.isEmpty) {
unspentCoins.forEach((coin) => _addCoinInfo(coin));
transaction_history.txHistoryMutex.release();
return;
}
@@ -557,9 +555,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
await _refreshUnspentCoinsInfo();
_askForUpdateBalance();
transaction_history.txHistoryMutex.release();
} catch (e, s) {
transaction_history.txHistoryMutex.release();
printV(e.toString());
onError?.call(FlutterErrorDetails(
exception: e,
+1 -2
View File
@@ -12,7 +12,6 @@ import 'package:cw_core/wallet_info.dart';
import 'package:cw_core/wallet_service.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:cw_monero/api/account_list.dart';
import 'package:cw_monero/api/transaction_history.dart';
import 'package:cw_monero/api/wallet_manager.dart' as monero_wallet_manager;
import 'package:cw_monero/api/wallet_manager.dart';
import 'package:cw_monero/ledger.dart';
@@ -160,7 +159,7 @@ class MoneroWalletService extends WalletService<
}
await wallet.init();
await wallet.updateUnspent();
return wallet;
} catch (e) {
// TODO: Implement Exception for wallet list service.