8 lines
195 B
TypeScript
8 lines
195 B
TypeScript
|
import usePrices from './usePrices'
|
||
|
|
||
|
export default function usePrice(denom: string) {
|
||
|
const { data: prices } = usePrices()
|
||
|
|
||
|
return prices.find((coin) => coin.denom === denom)?.amount ?? 0
|
||
|
}
|