Skip to content

Commit

Permalink
chore: change swap api endpoint (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwoktung authored Jul 3, 2023
1 parent 847e2ef commit b65a3c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/kit/src/views/Swap/quoter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class SwapQuoter {
urlParams.quoterType = '0x';
const serverEndPont =
await backgroundApiProxy.serviceSwap.getServerEndPoint();
const url = `${serverEndPont}/exchange/quote`;
const url = `${serverEndPont}/swap/v2/quote`;
const res = await this.httpClient.get(url, { params: urlParams });
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const response = res.data?.data as FetchQuoteHttpResponse | undefined;
Expand Down Expand Up @@ -332,7 +332,7 @@ export class SwapQuoter {

const serverEndPont =
await backgroundApiProxy.serviceSwap.getServerEndPoint();
const url = `${serverEndPont}/exchange/quote`;
const url = `${serverEndPont}/swap/v2/quote`;

const res = await this.httpClient.get(url, { params: urlParams });
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Expand All @@ -355,7 +355,7 @@ export class SwapQuoter {

const serverEndPont =
await backgroundApiProxy.serviceSwap.getServerEndPoint();
const url = `${serverEndPont}/exchange/quote_all`;
const url = `${serverEndPont}/swap/quote_all`;

const res = await this.httpClient.get(url, { params: urlParams });
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Expand Down Expand Up @@ -412,7 +412,7 @@ export class SwapQuoter {
urlParams.disableValidate = Boolean(params.disableValidate);
const serverEndPont =
await backgroundApiProxy.serviceSwap.getServerEndPoint();
const url = `${serverEndPont}/exchange/build_tx`;
const url = `${serverEndPont}/swap/build_tx`;

const res = await this.httpClient.post(url, urlParams);
const requestId = this.parseRequestId(res);
Expand Down

0 comments on commit b65a3c9

Please sign in to comment.