mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
minor change
This commit is contained in:
parent
e8ee380321
commit
a2cba36e76
|
@ -81,7 +81,7 @@ describe("Swap | Mainnet", function () {
|
||||||
/* eth -> dai */
|
/* eth -> dai */
|
||||||
const sellTokenAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; // eth, decimals 18
|
const sellTokenAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; // eth, decimals 18
|
||||||
const sellTokenDecimals = 18;
|
const sellTokenDecimals = 18;
|
||||||
const buyTokenAddress = "0x6B175474E89094C44Da98b954EedeAC495271d0F"; // DAI, decimals 6
|
const buyTokenAddress = "0x6B175474E89094C44Da98b954EedeAC495271d0F"; // DAI, decimals 18
|
||||||
const buyTokenDecimals = 18;
|
const buyTokenDecimals = 18;
|
||||||
const amount = 1;
|
const amount = 1;
|
||||||
|
|
||||||
|
@ -169,7 +169,14 @@ describe("Swap | Mainnet", function () {
|
||||||
];
|
];
|
||||||
var iface = new ethers.utils.Interface(abi);
|
var iface = new ethers.utils.Interface(abi);
|
||||||
const spell = connector === "1INCH-A" ? "sell" : "swap";
|
const spell = connector === "1INCH-A" ? "sell" : "swap";
|
||||||
let data = iface.encodeFunctionData(spell, [buyTokenAddress, sellTokenAddress, srcAmount, unitAmt, callData, 0]);
|
let data = iface.encodeFunctionData(spell, [
|
||||||
|
buyTokenAddress,
|
||||||
|
sellTokenAddress,
|
||||||
|
srcAmount,
|
||||||
|
unitAmt,
|
||||||
|
callData,
|
||||||
|
0
|
||||||
|
]);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
let data1Inch = ethers.utils.hexlify(await getCallData("1INCH-A", unitAmt1Inch, calldata1Inch));
|
let data1Inch = ethers.utils.hexlify(await getCallData("1INCH-A", unitAmt1Inch, calldata1Inch));
|
||||||
|
@ -178,7 +185,6 @@ describe("Swap | Mainnet", function () {
|
||||||
let datas = [data1Inch, dataPara, dataZeroX];
|
let datas = [data1Inch, dataPara, dataZeroX];
|
||||||
|
|
||||||
let connectors = ["1INCH-A", "PARASWAP-A", "ZEROX-A"];
|
let connectors = ["1INCH-A", "PARASWAP-A", "ZEROX-A"];
|
||||||
|
|
||||||
return [connectors, datas];
|
return [connectors, datas];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user