bitcoin/bitcoin — Issue #641: [patch] address/label search tweak
Author: ovidiusoft
Created: 2011-11-18 09:14:48+00:00
State: open

The following patch allows for filtering addresses and labels by searching for the typed string anywhere, not just at the beginning. Trivial to test, and it helps a little with usability:

--- src/qt/transactionfilterproxy.cpp.old	2011-11-18 10:56:12.764263766 +0200
+++ src/qt/transactionfilterproxy.cpp	2011-11-18 10:59:07.064263768 +0200
@@ -35,7 +35,8 @@
return false;
if(datetime < dateFrom || datetime > dateTo)
return false;
- if(!address.startsWith(addrPrefix) && !label.startsWith(addrPrefix))
+ //if(!address.startsWith(addrPrefix) && !label.startsWith(addrPrefix))
+ if (!address.contains(addrPrefix, Qt::CaseInsensitive) && !label.contains(addrPrefix, Qt::CaseInsensitive))
return false;
if(amount < minAmount)
return false;