From b0ce9996124a015bc741220ba970cb9fb4c4a234 Mon Sep 17 00:00:00 2001 From: Aaron Cox Date: Tue, 27 Jun 2023 09:30:28 -0700 Subject: [PATCH] Use `PublicKey` equality check to support multiple key formats Fixes #1347 --- app/shared/components/Tools/Keys.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/shared/components/Tools/Keys.js b/app/shared/components/Tools/Keys.js index 38212d692..7806088e2 100644 --- a/app/shared/components/Tools/Keys.js +++ b/app/shared/components/Tools/Keys.js @@ -80,9 +80,13 @@ class ToolsKeys extends Component { const { confirmRemove, legacy, openKey, searchFilter } = this.state; let filtered = [...pubkeys.available]; if (searchFilter !== '') { - filtered = [...pubkeys.available].filter(k => - k.toLowerCase().includes(searchFilter.toLowerCase()) - ); + try { + filtered = [...pubkeys.available].filter(k => + PublicKey.from(k).equals(PublicKey.from(searchFilter)) + ); + } catch (e) { + filtered = []; + } } return (