11 lines
302 B
TypeScript
11 lines
302 B
TypeScript
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: [],
|
|
revalidateOnFocus: false,
|
|
})
|
|
}
|