Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Test Aggregator Dev #1758

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions src/components/SwapForm/hooks/useGetRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ import { GetRouteParams } from 'services/route/types/getRoute'

import useGetSwapFeeConfig, { SwapFeeConfig } from 'components/SwapForm/hooks/useGetSwapFeeConfig'
import useSelectedDexes from 'components/SwapForm/hooks/useSelectedDexes'
import {
AGGREGATOR_API_PATHS,
ETHER_ADDRESS,
INPUT_DEBOUNCE_TIME,
SWAP_FEE_RECEIVER_ADDRESS,
ZERO_ADDRESS_SOLANA,
} from 'constants/index'
import { ETHER_ADDRESS, INPUT_DEBOUNCE_TIME, SWAP_FEE_RECEIVER_ADDRESS, ZERO_ADDRESS_SOLANA } from 'constants/index'
import { NETWORKS_INFO, isEVM } from 'constants/networks'
import { useActiveWeb3React } from 'hooks'
import useDebounce from 'hooks/useDebounce'
Expand Down Expand Up @@ -77,7 +71,7 @@ const getFeeConfigParams = (
}

const useGetRoute = (args: ArgsGetRoute) => {
const { aggregatorDomain, isEnableAuthenAggregator } = useKyberswapGlobalConfig()
const { isEnableAuthenAggregator } = useKyberswapGlobalConfig()
const { isSaveGas, parsedAmount, currencyIn, currencyOut, customChain, isProcessingSwap } = args
const { chainId: currentChain } = useActiveWeb3React()
const chainId = customChain || currentChain
Expand Down Expand Up @@ -165,7 +159,8 @@ const useGetRoute = (args: ArgsGetRoute) => {
delete params[key]
}
})
const url = `${aggregatorDomain}/${NETWORKS_INFO[chainId].aggregatorRoute}${AGGREGATOR_API_PATHS.GET_ROUTE}`

const url = `https://aggregator-api.dev.kyberengineering.io/${NETWORKS_INFO[chainId].aggregatorRoute}/api/v1/routes`

triggerDebounced({
url,
Expand All @@ -175,7 +170,6 @@ const useGetRoute = (args: ArgsGetRoute) => {

return undefined
}, [
aggregatorDomain,
chainId,
currencyIn,
currencyOut,
Expand Down
Loading