mars-v2-frontend/src/hooks/usePrice.tsx
Bob van der Helm 9a05d03db5
Update HC for Margin trade and HLS (#645)
* Update HC for Margin trade and HLS

* fix relative imports
2023-11-20 12:25:16 +01:00

9 lines
246 B
TypeScript

import { BN_ZERO } from 'constants/math'
import usePrices from 'hooks/usePrices'
export default function usePrice(denom: string) {
const { data: prices } = usePrices()
return prices.find((coin) => coin.denom === denom)?.amount ?? BN_ZERO
}