Skip to content

Commit b9b7211

Browse files
committed
Revert "Update exchange urlCreator (#3935)"
This reverts commit b17727a.
1 parent b17727a commit b9b7211

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pages/api/exchange/[[...params]].tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ const urlCreator = (
2424
basePath: string,
2525
) => {
2626
if (!path) return basePath
27-
// query starts with /swaps, for example: swap/v4.1/1/swap?...'
28-
const replacedRouteName = path.replace(`/api/${ROUTE_NAME}`, '/swap')
29-
const url = new URL(`${basePath}${replacedRouteName}`)
27+
const removedRouteName = path.replace(`/api/${ROUTE_NAME}`, '')
28+
const url = new URL(`${basePath}${removedRouteName}`)
3029

3130
// Add connectorTokens query param to the url if the network is mainnet
3231
if (Number(queryParams.networkId) === NetworkIds.MAINNET) {

0 commit comments

Comments
 (0)