Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
viatrix committed Nov 14, 2024
1 parent 9df8b94 commit c4a8ffe
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions testUnderForked/swapAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,21 +481,23 @@ contract("SwapAdapter", async (accounts) => {
});

it("should fail if the resource id is not configured", async () => {
const pathTokens = [WETH_ADDRESS, USDC_ADDRESS];
const pathTokens = [USDC_ADDRESS, ];
const pathFees = [500];
const amount = 1000000;
const amountOutMinimum = Ethers.utils.parseUnits("200000", "gwei");
const amount = Ethers.utils.parseUnits("200000", "gwei");
const amountOutMinimum = 1000000;
await usdc.approve(SwapAdapterInstance.address, amount, {from: USDC_OWNER_ADDRESS});
await Helpers.expectToRevertWithCustomError(
SwapAdapterInstance.depositTokensToEth.call(
SwapAdapterInstance.depositEthToTokens.call(
destinationDomainID,
recipientAddress,
USDC_ADDRESS,
amount,
amountOutMinimum,
pathTokens,
pathFees,
{from: USDC_OWNER_ADDRESS}
{
from: USDC_OWNER_ADDRESS,
value: amount
}
),
"TokenInvalid()"
);
Expand Down

0 comments on commit c4a8ffe

Please sign in to comment.