From c42909bab3e23d6e51e32172bf20f55a4225994d Mon Sep 17 00:00:00 2001 From: woodenfurniture <125113430+woodenfurniture@users.noreply.github.com> Date: Tue, 7 May 2024 11:04:42 +1000 Subject: [PATCH] chore: actioned gome code review feedback --- .../ManageAccountsDrawer/components/ImportAccounts.tsx | 4 ++-- .../ManageAccountsDrawer/components/SelectChain.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx b/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx index b97985557af..33922d6fdf8 100644 --- a/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx +++ b/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx @@ -66,7 +66,7 @@ const TableRowAccount = forwardRef(({ asset, accoun const { data: account, isLoading } = useQuery(accountManagement.getAccount(accountId)) - const assetBalancePrecision = useMemo(() => { + const assetBalanceCryptoPrecision = useMemo(() => { if (!account) return '0' return fromBaseUnit(account.balance, asset.precision) }, [account, asset.precision]) @@ -84,7 +84,7 @@ const TableRowAccount = forwardRef(({ asset, accoun {isLoading ? ( ) : ( - + )} diff --git a/src/components/ManageAccountsDrawer/components/SelectChain.tsx b/src/components/ManageAccountsDrawer/components/SelectChain.tsx index 7ba5920bf24..69ec1738f5c 100644 --- a/src/components/ManageAccountsDrawer/components/SelectChain.tsx +++ b/src/components/ManageAccountsDrawer/components/SelectChain.tsx @@ -53,20 +53,20 @@ export const SelectChain = ({ onSelectChainId, onClose }: SelectChainProps) => { const walletSupportedChainIds = useAppSelector(selectWalletSupportedChainIds) - const searching = useMemo(() => searchQuery.length > 0, [searchQuery]) + const isSearching = useMemo(() => searchQuery.length > 0, [searchQuery]) useEffect(() => { - if (!searching) return + if (!isSearching) return setSearchTermChainIds(filterChainIdsBySearchTerm(searchQuery, walletSupportedChainIds)) - }, [searchQuery, searching, walletSupportedChainIds]) + }, [searchQuery, isSearching, walletSupportedChainIds]) const chainButtons = useMemo(() => { - const listChainIds = searching ? searchTermChainIds : walletSupportedChainIds + const listChainIds = isSearching ? searchTermChainIds : walletSupportedChainIds return listChainIds.map(chainId => { return }) - }, [onSelectChainId, searchTermChainIds, searching, walletSupportedChainIds]) + }, [onSelectChainId, searchTermChainIds, isSearching, walletSupportedChainIds]) const footer = useMemo(() => { return (