Skip to content

Commit

Permalink
use protocol metrics price
Browse files Browse the repository at this point in the history
  • Loading branch information
brightiron committed Nov 22, 2023
1 parent 26d51a1 commit 8fae566
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/views/MyBalances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -42,7 +42,7 @@ export const MyBalances: FC<OHMAssetsProps> = () => {
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];
Expand Down
4 changes: 2 additions & 2 deletions src/views/Range/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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`;

Expand Down

0 comments on commit 8fae566

Please sign in to comment.