Skip to content

Commit

Permalink
Use PublicKey equality check to support multiple key formats
Browse files Browse the repository at this point in the history
Fixes #1347
  • Loading branch information
aaroncox committed Jun 27, 2023
1 parent 7c6377a commit b0ce999
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/shared/components/Tools/Keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ class ToolsKeys extends Component<Props> {
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 (
<Segment color="violet" piled style={{ margin: 0 }}>
Expand Down

0 comments on commit b0ce999

Please sign in to comment.