mars-v2-frontend/hooks/useTokenPrices.tsx
Gustavo Mauricio d22de166da
Borrow improvements (#29)
* update token prices and market data to match smart contract

* feat: redbank balances query and respective rendering on ui

* query key for rb balances and respective invalidations

* update contracts config

* fix: avoid returning negative max borrow amounts

* fix: added deposit action to repay execute message

* add minus sign before apy on debt positions

* consider market liquidity on max borrow calculation

* hive url added to chain config

* update hardcoded token decimals
2022-10-24 16:15:26 +01:00

17 lines
346 B
TypeScript

import { useQuery } from '@tanstack/react-query'
const useTokenPrices = () => {
return useQuery<{ [key in string]: number }>(
['tokenPrices'],
() => ({
uosmo: 1,
'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2': 1.5,
}),
{
staleTime: Infinity,
}
)
}
export default useTokenPrices