Skip to content

Commit

Permalink
feat: add token metadata logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Space-Bean committed Jul 4, 2024
1 parent 3b96687 commit 5e1b353
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion projects/dex-ui/src/tokens/useTokenMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getIsValidEthereumAddress } from "src/utils/addresses";
import { queryKeys } from "src/utils/query/queryKeys";
import { ERC20Token, Token } from "@beanstalk/sdk";
import { images } from "src/assets/images/tokens";
import { useMemo } from "react";
import { useEffect, useMemo } from "react";

const emptyMetas: TokenMetadataResponse = {
decimals: null,
Expand Down Expand Up @@ -71,6 +71,13 @@ export const useTokenMetadata = (params: string | TokenIsh): TokenMetadataRespon
staleTime: Infinity
});

useEffect(() => {
if (existingMetas.symbol?.toLowerCase() === "wsteth") {
console.log("existing metas: ", existingMetas);
console.log("query data: ", query.data);
}
}, [existingMetas, query])

const metadatas = useMemo(() => {
const meta: TokenMetadataResponse = {
name: existingMetas?.name ?? query.data?.name ?? null,
Expand Down

0 comments on commit 5e1b353

Please sign in to comment.