* MP-3556: first PythDataFeed class * fix: fixed the timestamp * fix: fixed the chart data * fix: fixed the prices * fix: fixed the math and decimal scale * tidy: refactor * fix: update the pythFeedId * fix: updated OsmosisTheGraphDataFeed * fix: add a fallback for non pyth data * tidy: refactor * fix: adjusted to feedback
16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
import { getSwapperQueryClient } from 'api/cosmwasm-client'
|
|
|
|
export default async function getSwapRoute(denomIn: string, denomOut: string): Promise<Route[]> {
|
|
try {
|
|
const swapperClient = await getSwapperQueryClient()
|
|
const routes = await swapperClient.route({
|
|
denomIn,
|
|
denomOut,
|
|
})
|
|
|
|
return routes.route as unknown as Route[]
|
|
} catch (ex) {
|
|
return []
|
|
}
|
|
}
|