From 7dae9496ba29d85786dc2dc5f8f7053078b319e1 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 21 Jul 2022 10:16:49 +0200 Subject: [PATCH] fix case insensitive matching on address and txo entries --- .../sparrowwallet/sparrow/control/SearchWalletDialog.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/SearchWalletDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/SearchWalletDialog.java index daceb1bb..5acab5f4 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/SearchWalletDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/SearchWalletDialog.java @@ -170,7 +170,7 @@ public class SearchWalletDialog extends Dialog { NodeEntry purposeEntry = walletForm.getNodeEntry(keyPurpose); for(Entry entry : purposeEntry.getChildren()) { if(entry instanceof NodeEntry nodeEntry) { - if(nodeEntry.getAddress().toString().contains(searchText) || + if(nodeEntry.getAddress().toString().toLowerCase().contains(searchText) || (nodeEntry.getLabel() != null && nodeEntry.getLabel().toLowerCase().contains(searchText)) || (nodeEntry.getValue() != null && searchValue != null && Math.abs(nodeEntry.getValue()) == searchValue)) { matchingEntries.add(entry); @@ -184,7 +184,7 @@ public class SearchWalletDialog extends Dialog { NodeEntry purposeEntry = nestedWalletForm.getNodeEntry(keyPurpose); for(Entry entry : purposeEntry.getChildren()) { if(entry instanceof NodeEntry nodeEntry) { - if(nodeEntry.getAddress().toString().contains(searchText) || + if(nodeEntry.getAddress().toString().toLowerCase().contains(searchText) || (nodeEntry.getLabel() != null && nodeEntry.getLabel().toLowerCase().contains(searchText)) || (nodeEntry.getValue() != null && searchValue != null && Math.abs(nodeEntry.getValue()) == searchValue)) { matchingEntries.add(entry); @@ -197,7 +197,7 @@ public class SearchWalletDialog extends Dialog { WalletUtxosEntry walletUtxosEntry = walletForm.getWalletUtxosEntry(); for(Entry entry : walletUtxosEntry.getChildren()) { if(entry instanceof HashIndexEntry hashIndexEntry) { - if(hashIndexEntry.getBlockTransaction().getHash().toString().equals(searchText) || + if(hashIndexEntry.getBlockTransaction().getHash().toString().toLowerCase().equals(searchText) || (hashIndexEntry.getLabel() != null && hashIndexEntry.getLabel().toLowerCase().contains(searchText)) || (hashIndexEntry.getValue() != null && searchValue != null && Math.abs(hashIndexEntry.getValue()) == searchValue)) { matchingEntries.add(entry);