2023-07-26 06:23:30 +00:00
|
|
|
import useSWR from 'swr'
|
|
|
|
|
|
|
|
import getSwapRoute from 'api/swap/getSwapRoute'
|
|
|
|
|
|
|
|
export default function useSwapRoute(denomIn: string, denomOut: string) {
|
|
|
|
return useSWR(`swapRoute-${denomIn}-${denomOut}`, () => getSwapRoute(denomIn, denomOut), {
|
|
|
|
fallbackData: [],
|
2023-08-05 09:52:11 +00:00
|
|
|
revalidateOnFocus: false,
|
2023-07-26 06:23:30 +00:00
|
|
|
})
|
|
|
|
}
|