Allow search for prefix as Displayed in contact list.

This commit is contained in:
ericz committed 2026-03-02 21:35:16 +01:00
1 parent 6bd3c17cdf
commit b7d5ee5754
1 file changed
+3
+3
View File
@@ -19,6 +19,9 @@ String? _extractHexPrefix(String query) {
if (cleaned.startsWith('0x')) { if (cleaned.startsWith('0x')) {
cleaned = cleaned.substring(2); cleaned = cleaned.substring(2);
} }
if (cleaned.startsWith('<')) {
cleaned = cleaned.substring(1).replaceAll(">", "");
}
cleaned = cleaned.replaceAll(' ', ''); cleaned = cleaned.replaceAll(' ', '');
if (cleaned.length < 2) return null; if (cleaned.length < 2) return null;
if (!RegExp(r'^[0-9a-f]+$').hasMatch(cleaned)) return null; if (!RegExp(r'^[0-9a-f]+$').hasMatch(cleaned)) return null;