mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
update
This commit is contained in:
parent
3b4e272090
commit
2a0a61f1e1
|
@ -35,7 +35,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
token1 = changeEthAddrToWethAddr(token1);
|
||||
token2 = changeEthAddrToWethAddr(token2);
|
||||
amount = getUint(getId, amount);
|
||||
if(data.poolId == uint256(-1)|| data.version < 0 || data.lpToken == address(0)){
|
||||
if(data.poolId == uint256(-1)|| data.version <= 0 || data.lpToken == address(0)){
|
||||
data = _getPoolId(
|
||||
token1,
|
||||
token2
|
||||
|
@ -74,7 +74,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
token1 = changeEthAddrToWethAddr(token1);
|
||||
token2 = changeEthAddrToWethAddr(token2);
|
||||
amount = getUint(getId, amount);
|
||||
if(data.poolId == uint256(-1)|| data.version < 0){
|
||||
if(data.poolId == uint256(-1)|| data.version <= 0){
|
||||
data = _getPoolId(
|
||||
token1,
|
||||
token2
|
||||
|
@ -106,7 +106,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
{
|
||||
token1 = changeEthAddrToWethAddr(token1);
|
||||
token2 = changeEthAddrToWethAddr(token2);
|
||||
if(data.poolId == uint256(-1)|| data.version < 0 ){
|
||||
if(data.poolId == uint256(-1)|| data.version <= 0 ){
|
||||
data = _getPoolId(
|
||||
token1,
|
||||
token2
|
||||
|
@ -145,7 +145,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
token1 = changeEthAddrToWethAddr(token1);
|
||||
token2 = changeEthAddrToWethAddr(token2);
|
||||
amount = getUint(getId, amount);
|
||||
if(data.poolId == uint256(-1)|| data.version < 0){
|
||||
if(data.poolId == uint256(-1)|| data.version <= 0){
|
||||
data = _getPoolId(
|
||||
token1,
|
||||
token2
|
||||
|
@ -178,7 +178,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
{
|
||||
token1 = changeEthAddrToWethAddr(token1);
|
||||
token2 = changeEthAddrToWethAddr(token2);
|
||||
if(data.poolId == uint256(-1)|| data.version < 0 ){
|
||||
if(data.poolId == uint256(-1)|| data.version <= 0 ){
|
||||
data = _getPoolId(
|
||||
token1,
|
||||
token2
|
||||
|
|
|
@ -94,6 +94,12 @@ describe("Sushiswap", function () {
|
|||
});
|
||||
|
||||
describe("Main", function () {
|
||||
const data = {
|
||||
poolId: 0,
|
||||
version: 0,
|
||||
lpToken: ethers.constants.AddressZero
|
||||
}
|
||||
|
||||
it("Should deposit successfully", async function () {
|
||||
const ethAmount = ethers.utils.parseEther("2") // 1 ETH
|
||||
const daiUnitAmount = ethers.utils.parseEther("4000") // 1 ETH
|
||||
|
@ -134,7 +140,8 @@ describe("Sushiswap", function () {
|
|||
DAI_ADDR,
|
||||
ethers.utils.parseEther("10"),
|
||||
getId,
|
||||
setId
|
||||
setId,
|
||||
data
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -152,7 +159,8 @@ describe("Sushiswap", function () {
|
|||
args: [
|
||||
WETH_ADDR,
|
||||
DAI_ADDR,
|
||||
setId
|
||||
setId,
|
||||
data
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -173,7 +181,8 @@ describe("Sushiswap", function () {
|
|||
DAI_ADDR,
|
||||
ethers.utils.parseEther("1"),
|
||||
getId,
|
||||
setId
|
||||
setId,
|
||||
data
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -194,7 +203,8 @@ describe("Sushiswap", function () {
|
|||
DAI_ADDR,
|
||||
ethers.utils.parseEther("1"),
|
||||
getId,
|
||||
setId
|
||||
setId,
|
||||
data
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user