We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32b0e5d commit b17727aCopy full SHA for b17727a
pages/api/exchange/[[...params]].tsx
@@ -24,8 +24,9 @@ const urlCreator = (
24
basePath: string,
25
) => {
26
if (!path) return basePath
27
- const removedRouteName = path.replace(`/api/${ROUTE_NAME}`, '')
28
- const url = new URL(`${basePath}${removedRouteName}`)
+ // query starts with /swaps, for example: swap/v4.1/1/swap?...'
+ const replacedRouteName = path.replace(`/api/${ROUTE_NAME}`, '/swap')
29
+ const url = new URL(`${basePath}${replacedRouteName}`)
30
31
// Add connectorTokens query param to the url if the network is mainnet
32
if (Number(queryParams.networkId) === NetworkIds.MAINNET) {
0 commit comments