diff --git a/src/app/hooks/lending/useGetLendingHistory.ts b/src/app/hooks/lending/useGetLendingHistory.ts index 62aa9cb75c..410f1693bc 100644 --- a/src/app/hooks/lending/useGetLendingHistory.ts +++ b/src/app/hooks/lending/useGetLendingHistory.ts @@ -7,7 +7,7 @@ import { LoanTokenGraphItem } from 'app/components/LoanTokenGraphs/types'; export function useGetLendingHistory(pool: LendingPool) { const [data, setData] = useState([]); - const poolAddress = getLendingContract(pool.getAsset()).address; + const poolAddress = getLendingContract(pool.getAsset())?.address; useEffect(() => { if (currentChainId !== undefined) { diff --git a/src/app/hooks/lending/useLending_recentRewardSOV.ts b/src/app/hooks/lending/useLending_recentRewardSOV.ts index a7761157e4..8c267bbd03 100644 --- a/src/app/hooks/lending/useLending_recentRewardSOV.ts +++ b/src/app/hooks/lending/useLending_recentRewardSOV.ts @@ -14,7 +14,7 @@ export function useLending_recentRewardSOV(asset: Asset) { const { value: poolID, loading: poolIDLoading, - } = useLiquidityMining_getPoolId(getLendingContract(asset).address); + } = useLiquidityMining_getPoolId(getLendingContract(asset)?.address); useEffect(() => { if ( diff --git a/src/app/pages/LendingPage/components/CurrencyContainer/UserLendingInfo.tsx b/src/app/pages/LendingPage/components/CurrencyContainer/UserLendingInfo.tsx index 64594019fb..e1f59fd8e7 100644 --- a/src/app/pages/LendingPage/components/CurrencyContainer/UserLendingInfo.tsx +++ b/src/app/pages/LendingPage/components/CurrencyContainer/UserLendingInfo.tsx @@ -43,7 +43,7 @@ export const UserLendingInfo: React.FC = ({ value: rewards, loading: rewardsLoading, } = useLiquidityMining_getUserAccumulatedReward( - getLendingContract(asset).address, + getLendingContract(asset)?.address, ); const recentRewardSOV = useLending_recentRewardSOV(asset); diff --git a/src/utils/blockchain/cache.ts b/src/utils/blockchain/cache.ts index 6e51f5fb50..428b68670e 100644 --- a/src/utils/blockchain/cache.ts +++ b/src/utils/blockchain/cache.ts @@ -126,7 +126,7 @@ export const getCall = (id: string) => { }; export const idHash = (args: any[]) => { - const params = args.map(item => item.toString().toLowerCase()); + const params = args.map(item => item?.toString().toLowerCase()); const json = JSON.stringify(params); return hashMessage(json); };