Skip to content

Commit

Permalink
devop: 🔧 switch to 1inch v6
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Mar 5, 2024
1 parent c55e290 commit 78ad2df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/swap/src/providers/oneInch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import estimateGasList from "../../common/estimateGasList";
import { isEVMAddress } from "../../utils/common";

export const ONEINCH_APPROVAL_ADDRESS =
"0x1111111254eeb25477b68fb85ed929f73a960582";
"0x111111125421ca6dc452d289314280a0f8842a65";
const supportedNetworks: {
[key in SupportedNetworkName]?: { approvalAddress: string; chainId: string };
} = {
Expand Down Expand Up @@ -80,12 +80,12 @@ const supportedNetworks: {
chainId: "42161",
},
[SupportedNetworkName.Zksync]: {
approvalAddress: "0x6e2b76966cbd9cf4cc2fa0d76d24d5241e0abc2f",
approvalAddress: "0x6fd4383cb451173d5f9304f041c7bcbf27d561ff",
chainId: "324",
},
};

const BASE_URL = "https://partners.mewapi.io/oneinch/v5.2/";
const BASE_URL = "https://partners.mewapi.io/oneinch/v6.0/";

class OneInch extends ProviderClass {
tokenList: TokenType[];
Expand Down Expand Up @@ -219,7 +219,7 @@ class OneInch extends ProviderClass {
}
return {
transactions,
toTokenAmount: toBN(response.toAmount),
toTokenAmount: toBN(response.dstAmount),
fromTokenAmount: options.amount,
};
})
Expand Down
2 changes: 1 addition & 1 deletion packages/swap/src/providers/oneInch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BN, EVMTransaction } from "../../types";
export interface OneInchResponseType {
error?: string;
description?: string;
toAmount: string;
dstAmount: string;
tx: {
from: string;
to: string;
Expand Down

1 comment on commit 78ad2df

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.