From 438f8f5e6dad071fc6e8b0bb155b9319881d1022 Mon Sep 17 00:00:00 2001 From: maro Date: Sun, 4 Feb 2024 09:30:02 +0900 Subject: [PATCH] fix: add support for token search by symbol name --- src/pages/Analytics/AllTokens.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/Analytics/AllTokens.tsx b/src/pages/Analytics/AllTokens.tsx index 5eb97c7..666c55c 100644 --- a/src/pages/Analytics/AllTokens.tsx +++ b/src/pages/Analytics/AllTokens.tsx @@ -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]);