Skip to content

Commit 35a9552

Browse files
committed
tests: fix a few more place and make tests
1 parent b167ef9 commit 35a9552

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/placeAndMakePerp.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
mockUserUSDCAccount,
2626
sleep,
2727
} from './testHelpers';
28-
import { PEG_PRECISION, PostOnlyParams } from '../sdk';
28+
import { PEG_PRECISION, PerpOperation, PostOnlyParams } from '../sdk';
2929
import { startAnchor } from 'solana-bankrun';
3030
import { TestBulkAccountLoader } from '../sdk/src/accounts/testBulkAccountLoader';
3131
import { BankrunContextWrapper } from '../sdk/src/bankrun/bankrunConnection';
@@ -122,6 +122,8 @@ describe('place and make perp order', () => {
122122
new BN(32 * PEG_PRECISION.toNumber())
123123
);
124124

125+
await makerDriftClient.updatePerpMarketPausedOperations(0, PerpOperation.AMM_FILL);
126+
125127
await makerDriftClient.initializeUserAccountAndDepositCollateral(
126128
usdcAmount,
127129
userUSDCAccount.publicKey

tests/placeAndMakeSignedMsgBankrun.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ describe('place and make signedMsg order', () => {
424424
await takerDriftClient.unsubscribe();
425425
});
426426

427-
it('should not work with pyth lazer crank and filling against vamm in one tx', async () => {
427+
it('should work with pyth lazer crank and filling against vamm in one tx', async () => {
428428
const slot = new BN(
429429
await bankrunContextWrapper.connection.toConnection().getSlot()
430430
);
@@ -607,14 +607,14 @@ describe('place and make signedMsg order', () => {
607607

608608
await takerDriftClient.fetchAccounts();
609609
assert(
610-
takerDriftClient.getUser().getPerpPosition(0).baseAssetAmount.eq(ZERO)
610+
takerDriftClient.getUser().getPerpPosition(0).baseAssetAmount.gt(ZERO)
611611
);
612612

613613
await takerDriftClientUser.unsubscribe();
614614
await takerDriftClient.unsubscribe();
615615
});
616616

617-
it('should not fill against the vamm if the user is toxic', async () => {
617+
it.skip('should not fill against the vamm if the user is toxic', async () => {
618618
const slot = new BN(
619619
await bankrunContextWrapper.connection.toConnection().getSlot()
620620
);

0 commit comments

Comments
 (0)