Skip to content

Commit 5e0a66b

Browse files
authored
chore: update debt swap test (#621)
1 parent 8c81142 commit 5e0a66b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

packages/flash-loans/src/aave/debtSwap.integration.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ describe('AaveFlashLoanIntegration.debtSwap', () => {
4545
const flashLoanSdk = new AaveCollateralSwapSdk()
4646

4747
const owner = (await adapter.signer.getAddress()) as AccountAddress
48-
const sellAmount = 20000000000000000000n // 20 WXDAI
48+
const sellAmount = 2000000n // 2 USDC.e
4949
// The amount is before slippage and partner fee!
50-
const buyAmount = 18000000n // 18 USDC.e
50+
const buyAmount = 11000000000000000n // 0.011 GNO
5151
const validTo = Math.ceil(Date.now() / 1000) + 10 * 60 // 10m
5252
const flashLoanFeePercent = 0.05 // 0.05%
5353
const slippageBps = 0 // 0.08%
@@ -65,16 +65,18 @@ describe('AaveFlashLoanIntegration.debtSwap', () => {
6565
})
6666

6767
const limitOrder: LimitTradeParameters = {
68-
sellToken: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', // WXDAI
69-
sellTokenDecimals: 18,
70-
buyToken: '0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0', // USDC.e
71-
buyTokenDecimals: 6,
68+
sellToken: '0x2a22f9c3b484c3629090FeED35F17Ff8F88f76F0', // USDC.e
69+
sellTokenDecimals: 6,
70+
buyToken: '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb', // GNO
71+
buyTokenDecimals: 18,
7272
sellAmount: sellAmountToSign.toString(),
7373
buyAmount: buyAmount.toString(),
74-
kind: OrderKind.SELL,
74+
kind: OrderKind.BUY,
7575
validTo,
76-
slippageBps,
77-
partnerFee,
76+
slippageBps: 0,
77+
partnerFee: undefined,
78+
//slippageBps,
79+
//partnerFee,
7880
}
7981

8082
const orderToSign = getOrderToSign(

0 commit comments

Comments
 (0)