From a6432732f0d7d6839c07ea935217f8b3c0f93dbc Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 7 Nov 2023 10:47:34 +0100 Subject: [PATCH] qml: addresses/coins filter match case insensitive, don't match 'None' for undefined fields --- electrum/gui/qml/qeaddresslistmodel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/qeaddresslistmodel.py b/electrum/gui/qml/qeaddresslistmodel.py index d87b027ee..c9b37c769 100644 --- a/electrum/gui/qml/qeaddresslistmodel.py +++ b/electrum/gui/qml/qeaddresslistmodel.py @@ -49,8 +49,9 @@ class QEAddressCoinFilterProxyModel(QSortFilterProxyModel): outpoint = parent_model.data(parent_model.index(s_row, 0, s_parent), parent_model._ROLE_RMAP['outpoint']) amount_i = parent_model.data(parent_model.index(s_row, 0, s_parent), parent_model._ROLE_RMAP['amount']) amount = parent_model.wallet.config.format_amount(amount_i.satsInt) if amount_i else None + filter_text = self._filter_text.casefold() for item in [label, address, outpoint, amount]: - if self._filter_text in str(item): + if item is not None and filter_text in str(item).casefold(): return True return False return True