Skip to content

Commit

Permalink
fix: add support for token search by symbol name
Browse files Browse the repository at this point in the history
  • Loading branch information
honeymaro committed Feb 7, 2024
1 parent bbf521c commit 438f8f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/Analytics/AllTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ function AllTokens() {
return tokens.filter((token) => {
if (!searchKeyword) return true;
const asset = getAsset(token.address);
return (
asset?.token?.toLowerCase().includes(searchKeyword.toLowerCase()) ||
asset?.name?.toLowerCase().includes(searchKeyword.toLowerCase())
return [asset?.token, asset?.name, asset?.symbol].some((value) =>
value?.toLowerCase().includes(searchKeyword.toLowerCase()),
);
});
}, [getAsset, searchKeyword, tokens]);
Expand Down

0 comments on commit 438f8f5

Please sign in to comment.