Skip to content

Commit ee40ac8

Browse files
committed
adjust test to work with new price bands
1 parent 742ac6c commit ee40ac8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/liquidateBorrowForPerpPnl.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ describe('liquidate borrow for perp pnl', () => {
174174
new BN(0)
175175
);
176176

177-
await driftClient.moveAmmToPrice(0, new BN(2).mul(PRICE_PRECISION));
177+
await driftClient.moveAmmToPrice(0, PRICE_PRECISION.muln(120).divn(100));
178178

179179
await driftClient.closePosition(0);
180180

@@ -256,14 +256,15 @@ describe('liquidate borrow for perp pnl', () => {
256256
)
257257
);
258258
assert(liquidationRecord.liquidateBorrowForPerpPnl.perpMarketIndex === 0);
259+
259260
assert(
260261
liquidationRecord.liquidateBorrowForPerpPnl.pnlTransfer.gt(
261-
new BN(9969992 - 10)
262+
new BN(1977993 - 10)
262263
)
263264
);
264265
assert(
265266
liquidationRecord.liquidateBorrowForPerpPnl.pnlTransfer.lt(
266-
new BN(9969992 + 10)
267+
new BN(1977993 + 10)
267268
)
268269
);
269270
assert(
@@ -277,7 +278,7 @@ describe('liquidate borrow for perp pnl', () => {
277278

278279
assert(
279280
liquidationRecord.liquidateBorrowForPerpPnl.liabilityTransfer.eq(
280-
new BN(199399800)
281+
new BN(39559860)
281282
)
282283
);
283284
});

0 commit comments

Comments
 (0)