From 0543c4b044df13f03a30b94d0a9202820b449a11 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 13 Jan 2023 12:00:02 -0600 Subject: [PATCH] filter by address fixes --- .../address_book_views/subviews/contact_details_view.dart | 2 +- .../address_book_view/subwidgets/desktop_contact_details.dart | 3 ++- lib/services/coins/coin_paynym_extension.dart | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pages/address_book_views/subviews/contact_details_view.dart b/lib/pages/address_book_views/subviews/contact_details_view.dart index 5459f01a1..5c75b4beb 100644 --- a/lib/pages/address_book_views/subviews/contact_details_view.dart +++ b/lib/pages/address_book_views/subviews/contact_details_view.dart @@ -62,7 +62,7 @@ class _ContactDetailsViewState extends ConsumerState { final transactions = await manager.db.transactions .filter() .anyOf(contact.addresses.map((e) => e.address), - (q, String e) => q.addressEqualTo(e)) + (q, String e) => q.address((q) => q.valueEqualTo(e))) .sortByTimestampDesc() .findAll(); diff --git a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart index b48128319..da0adb59c 100644 --- a/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart +++ b/lib/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_details.dart @@ -4,6 +4,7 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:isar/isar.dart'; import 'package:stackwallet/models/contact.dart'; import 'package:stackwallet/models/isar/models/blockchain_data/transaction.dart'; +import 'package:stackwallet/models/isar/models/isar_models.dart'; import 'package:stackwallet/pages/address_book_views/subviews/add_new_contact_address_view.dart'; import 'package:stackwallet/pages_desktop_specific/address_book_view/subwidgets/desktop_address_card.dart'; import 'package:stackwallet/pages_desktop_specific/address_book_view/subwidgets/desktop_contact_options_menu_popup.dart'; @@ -61,7 +62,7 @@ class _DesktopContactDetailsState extends ConsumerState { final transactions = await manager.db.transactions .filter() .anyOf(contact.addresses.map((e) => e.address), - (q, String e) => q.addressEqualTo(e)) + (q, String e) => q.address((q) => q.valueEqualTo(e))) .sortByTimestampDesc() .findAll(); diff --git a/lib/services/coins/coin_paynym_extension.dart b/lib/services/coins/coin_paynym_extension.dart index 266963cea..02486e645 100644 --- a/lib/services/coins/coin_paynym_extension.dart +++ b/lib/services/coins/coin_paynym_extension.dart @@ -135,7 +135,7 @@ extension PayNym on DogecoinWallet { Future hasSentNotificationTx(PaymentCode pCode) async { final tx = await isar.transactions .filter() - .addressEqualTo(pCode.notificationAddress()) + .address((q) => q.valueEqualTo(pCode.notificationAddress())) .findFirst(); return tx; }