Skip to content

Commit

Permalink
Consistent approach
Browse files Browse the repository at this point in the history
  • Loading branch information
gpxl-dev committed Oct 11, 2023
1 parent 58dc0b6 commit b02dfc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/features/claims/hooks/useClaimableAmounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import {
useDefiLlamaBatchPrices,
} from "./useDefillamaBatchPrices";

const testnets = Object.keys(testnetClaimableTokens).map((t) => parseInt(t));

export const useClaimableAmounts = (points: number) => {
const chainId = useChainId() as SupportedChainId;

const isTestnet = Object.keys(testnetClaimableTokens).includes(
chainId.toString(),
);
const isTestnet = testnets.includes(chainId);

const tokenList = isTestnet
? testnetClaimableTokens[chainId]
Expand Down
2 changes: 1 addition & 1 deletion src/features/common/hooks/useIsSupportedChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useNetwork } from "wagmi";
import { contractAddressesByChain } from "../../../config/ContractAddresses";

const supportedChains = Object.keys(contractAddressesByChain).map((chainId) =>
parseInt(chainId, 10),
parseInt(chainId),
);
export const useIsSupportedChain = () => {
const { chain } = useNetwork();
Expand Down

0 comments on commit b02dfc2

Please sign in to comment.