fix: key image comparision (#2448)

* fix: key image comparision * Revert "fix: frozen coins displaying incorrect amounts in monero (#2385)" This reverts commit b6a7dde8e4a46da7e5cc82019c26876d4fa5d01b.

cyan committed Aug 13, 2025 at 00:32 UTC 75b811f9de936cd12e387d13800759548820fe8d
2 files changed +4 -7
cw_monero/lib/api/coins_info.dart
+1 -2
@@ -38,8 +38,7 @@ Future<int?> getCoinByKeyImage(String keyImage) async {
38 final count = await countOfCoins();
39 for (int i = 0; i < count; i++) {
40 final coin = await getCoin(i);
41 - final coinAddress = coin.keyImage;
42 - if (keyImage == coinAddress) {
41 + if (keyImage == coin.keyImage()) {
42 return i;
43 }
44 }
cw_monero/lib/monero_wallet.dart
+3 -5
@@ -879,12 +879,10 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
879 }
880
881 void _askForUpdateBalance() {
882 - final _ub = _getUnlockedBalance();
883 - final _fb =_getFrozenBalance();
884 - final unlockedBalance = _ub - _fb;
882 + final unlockedBalance = _getUnlockedBalance();
883 final fullBalance = monero_wallet.getFullBalance(
886 - accountIndex: walletAddresses.account!.id) - _fb;
887 - final frozenBalance = _fb;
884 + accountIndex: walletAddresses.account!.id);
885 + final frozenBalance = _getFrozenBalance();
886 if (balance[currency]!.fullBalance != fullBalance ||
887 balance[currency]!.unlockedBalance != unlockedBalance ||
888 balance[currency]!.frozenBalance != frozenBalance) {