Skip to content

Commit

Permalink
fix(core): updated token selection screen (#4047)
Browse files Browse the repository at this point in the history
fix(core): updated tokenselectionscreen
  • Loading branch information
fullstackninja864 authored Oct 10, 2023
1 parent 4be8592 commit 04bf50e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { PortfolioParamList } from "../PortfolioNavigator";
import { ActiveUSDValueV2 } from "../../Loans/VaultDetail/components/ActiveUSDValueV2";
import { TokenIcon } from "../components/TokenIcon";
import { TokenNameText } from "../components/TokenNameText";
import { useEvmTokenBalances } from "../hooks/EvmTokenBalances";

export interface TokenSelectionItem extends BottomSheetToken {
usdAmount: BigNumber;
Expand All @@ -57,6 +58,8 @@ export function TokenSelectionScreen(): JSX.Element {
const tokens = useSelector((state: RootState) =>
tokensSelector(state.wallet),
);
const { evmTokens } = useEvmTokenBalances();

const { hasFetchedToken } = useSelector((state: RootState) => state.wallet);
const [searchString, setSearchString] = useState("");
const { getTokenPrice } = useTokenPrice();
Expand All @@ -65,8 +68,7 @@ export function TokenSelectionScreen(): JSX.Element {
const [isSearchFocus, setIsSearchFocus] = useState(false);
const searchRef = useRef<TextInput>();

const filteredTokensByDomain =
domain === DomainType.EVM ? tokens.filter((t) => !t.isLPS) : tokens;
const filteredTokensByDomain = domain === DomainType.EVM ? evmTokens : tokens;

const tokensWithBalance = getTokensWithBalance(
filteredTokensByDomain,
Expand Down

0 comments on commit 04bf50e

Please sign in to comment.