diff --git a/src/apollo/pangochef.ts b/src/apollo/pangochef.ts index 4abd28bf4..a9890df34 100644 --- a/src/apollo/pangochef.ts +++ b/src/apollo/pangochef.ts @@ -133,7 +133,7 @@ export const GET_FARMS_STAKED = gql` `; /** - * this hook is useful to get information for pangochef famrs from subgraph + * this hook is useful to get information for pangochef farms from subgraph * @param * @returns list farms */ diff --git a/src/components/Pools/DetailModal/Header/index.tsx b/src/components/Pools/DetailModal/Header/index.tsx index 6c24d1713..a4cbbac92 100644 --- a/src/components/Pools/DetailModal/Header/index.tsx +++ b/src/components/Pools/DetailModal/Header/index.tsx @@ -64,7 +64,7 @@ const Header: React.FC = ({ stakingInfo, onClose }) => { const swapFeeAPR = stakingInfo?.swapFeeApr || 0; // for rest we get the data from contract calls if exist, else put 0 for this data if (cheftType === ChefType.PANGO_CHEF) { - const userApr = (stakingInfo as PangoChefInfo).userApr; + const userApr = (stakingInfo as PangoChefInfo)?.userApr ?? 0; return { totalApr: stakingAPR + swapFeeAPR + extraFarmAPR, diff --git a/src/components/Pools/PangoChef/ClaimReward/index.tsx b/src/components/Pools/PangoChef/ClaimReward/index.tsx index 438a6d41e..81116048a 100644 --- a/src/components/Pools/PangoChef/ClaimReward/index.tsx +++ b/src/components/Pools/PangoChef/ClaimReward/index.tsx @@ -58,7 +58,7 @@ const ClaimRewardV3 = ({ stakingInfo, onClose, redirectToCompound }: ClaimProps) hederaAssociated: isHederaTokenAssociated, } = useHederaTokenAssociated(notAssociateTokens?.[0]?.address, notAssociateTokens?.[0]?.symbol); - const { callback: claimRewardCallback } = useClaimRewardCallback(stakingInfo.pid, stakingInfo.poolType); + const { callback: claimRewardCallback } = useClaimRewardCallback(stakingInfo.pid); function wrappedOnDismiss() { setHash(undefined); diff --git a/src/components/Pools/PangoChef/Stake/index.tsx b/src/components/Pools/PangoChef/Stake/index.tsx index 111ed1904..f2dfbc2f4 100644 --- a/src/components/Pools/PangoChef/Stake/index.tsx +++ b/src/components/Pools/PangoChef/Stake/index.tsx @@ -5,7 +5,7 @@ import React, { useCallback, useContext, useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { ThemeContext } from 'styled-components'; import { Box, Button, DoubleCurrencyLogo, NumberOptions, Stat, Text, TextInput, Tooltip } from 'src/components'; -import { FARM_TYPE } from 'src/constants'; +import { BIG_INT_ZERO, FARM_TYPE } from 'src/constants'; import { PNG } from 'src/constants/tokens'; import { usePair } from 'src/data/Reserves'; import { useChainId, usePangolinWeb3 } from 'src/hooks'; @@ -280,15 +280,19 @@ const Stake = ({ onComplete, type, stakingInfo, combinedApr }: StakeProps) => { ); } else { + console.log({ approval }); return (