From 8fae56679c188a29a34f9dbb780fe6f6081dad7a Mon Sep 17 00:00:00 2001 From: brightiron Date: Wed, 22 Nov 2023 15:07:44 -0600 Subject: [PATCH] use protocol metrics price --- src/views/MyBalances/index.tsx | 4 ++-- src/views/Range/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/MyBalances/index.tsx b/src/views/MyBalances/index.tsx index 646efe0c2c..20638b05d7 100644 --- a/src/views/MyBalances/index.tsx +++ b/src/views/MyBalances/index.tsx @@ -18,7 +18,7 @@ import { useWsohmBalance, } from "src/hooks/useBalance"; import { useCurrentIndex } from "src/hooks/useCurrentIndex"; -import { useOhmPrice } from "src/hooks/usePrices"; +import { useOhmPrice } from "src/hooks/useProtocolMetrics"; import { useTestableNetworks } from "src/hooks/useTestableNetworks"; import { NetworkId } from "src/networkDetails"; import { useGetClearingHouse } from "src/views/Lending/Cooler/hooks/useGetClearingHouse"; @@ -42,7 +42,7 @@ export const MyBalances: FC = () => { const { address } = useAccount(); const networks = useTestableNetworks(); const { chain = { id: 1 } } = useNetwork(); - const { data: ohmPrice = 0 } = useOhmPrice(); + const ohmPrice = useOhmPrice({}) || 0; const { data: currentIndex = new DecimalBigNumber("0", 9) } = useCurrentIndex(); const { data: v1OhmBalance = new DecimalBigNumber("0", 9) } = useV1OhmBalance()[networks.MAINNET]; const { data: v1SohmBalance = new DecimalBigNumber("0", 9) } = useV1SohmBalance()[networks.MAINNET]; diff --git a/src/views/Range/index.tsx b/src/views/Range/index.tsx index 27d3f5a58e..25cb670fc8 100644 --- a/src/views/Range/index.tsx +++ b/src/views/Range/index.tsx @@ -10,7 +10,7 @@ import { formatNumber, parseBigNumber } from "src/helpers"; import { DecimalBigNumber } from "src/helpers/DecimalBigNumber/DecimalBigNumber"; import { useBalance } from "src/hooks/useBalance"; import { usePathForNetwork } from "src/hooks/usePathForNetwork"; -import { useOhmPrice } from "src/hooks/usePrices"; +import { useOhmPrice } from "src/hooks/useProtocolMetrics"; import { useTestableNetworks } from "src/hooks/useTestableNetworks"; import { DetermineRangePrice, OperatorReserveSymbol, RangeBondMaxPayout, RangeData } from "src/views/Range/hooks"; import RangeChart from "src/views/Range/RangeChart"; @@ -44,7 +44,7 @@ export const Range = () => { const { data: reserveBalance = new DecimalBigNumber("0", 18) } = useBalance(DAI_ADDRESSES)[networks.MAINNET]; const { data: ohmBalance = new DecimalBigNumber("0", 9) } = useBalance(OHM_ADDRESSES)[networks.MAINNET]; - const { data: currentPrice = 0 } = useOhmPrice(); + const currentPrice = useOhmPrice({}) || 0; const maxString = sellActive ? `Max You Can Sell` : `Max You Can Buy`;