@@ -3,9 +3,9 @@ import styled from "styled-components";
3
3
import { useParams } from "react-router-dom" ;
4
4
import { useCourtDetails , CourtDetailsQuery } from "queries/useCourtDetails" ;
5
5
import { useCoinPrice } from "hooks/useCoinPrice" ;
6
- import { usePNKMainnetAddress , useWETHMainnetAddress } from "hooks/useContractAddress" ;
7
6
import { formatETH , formatPNK , formatUnitsWei , formatUSD , isUndefined } from "utils/index" ;
8
7
import { calculateSubtextRender } from "utils/calculateSubtextRender" ;
8
+ import { CoinIds } from "consts/coingecko" ;
9
9
import StatDisplay , { IStatDisplay } from "components/StatDisplay" ;
10
10
import { StyledSkeleton } from "components/StyledSkeleton" ;
11
11
import BalanceIcon from "svgs/icons/law-balance.svg" ;
@@ -96,14 +96,13 @@ const stats: IStat[] = [
96
96
const Stats = ( ) => {
97
97
const { id } = useParams ( ) ;
98
98
const { data } = useCourtDetails ( id ) ;
99
- const coinIdToAddress = [ usePNKMainnetAddress ( ) , useWETHMainnetAddress ( ) ] ;
100
- const { prices : pricesData } = useCoinPrice ( coinIdToAddress ) ;
99
+ const coinIds = [ CoinIds . PNK , CoinIds . ETH ] ;
100
+ const { prices : pricesData } = useCoinPrice ( coinIds ) ;
101
101
102
102
return (
103
103
< StyledCard >
104
104
{ stats . map ( ( { title, coinId, getText, getSubtext, color, icon } , i ) => {
105
- const coinPrice = ! isUndefined ( pricesData ) ? pricesData [ coinIdToAddress [ coinId ! ] ] ?. price : undefined ;
106
-
105
+ const coinPrice = ! isUndefined ( pricesData ) ? pricesData [ coinIds [ coinId ! ] ] ?. price : undefined ;
107
106
return (
108
107
< StatDisplay
109
108
key = { i }
0 commit comments