Skip to content

Commit a4a2f02

Browse files
committed
move customCoder into sdk, lint
1 parent d374e55 commit a4a2f02

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed
File renamed without changes.

sdk/src/testClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ConfirmOptions, Signer, Transaction } from '@solana/web3.js';
33
import { TxSigAndSlot } from './tx/types';
44
import { PollingDriftClientAccountSubscriber } from './accounts/pollingDriftClientAccountSubscriber';
55
import { DriftClientConfig } from './driftClientConfig';
6-
import { AccountsCoder } from '@coral-xyz/anchor/dist/cjs/coder';
76

87
export class TestClient extends AdminClient {
98
public constructor(config: DriftClientConfig) {

tests/lpPool.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ import {
4040
PYTH_LAZER_STORAGE_ACCOUNT_KEY,
4141
PTYH_LAZER_PROGRAM_ID,
4242
BASE_PRECISION,
43-
getTokenAmount,
44-
SpotBalanceType,
4543
SPOT_MARKET_BALANCE_PRECISION,
4644
} from '../sdk/src';
4745

@@ -661,7 +659,8 @@ describe('LP Pool', () => {
661659

662660
const usdcBefore = constituent.tokenBalance;
663661
const lpAumBefore = lpPool.lastAum;
664-
const feePoolBalanceBefore = adminClient.getPerpMarketAccount(0).amm.feePool.scaledBalance;
662+
const feePoolBalanceBefore =
663+
adminClient.getPerpMarketAccount(0).amm.feePool.scaledBalance;
665664

666665
await adminClient.settlePerpToLpPool(encodeName(lpPoolName), [0, 1, 2]);
667666

@@ -674,14 +673,19 @@ describe('LP Pool', () => {
674673

675674
const usdcAfter = constituent.tokenBalance;
676675
const lpAumAfter = lpPool.lastAum;
677-
const feePoolBalanceAfter = adminClient.getPerpMarketAccount(0).amm.feePool.scaledBalance,;
676+
const feePoolBalanceAfter =
677+
adminClient.getPerpMarketAccount(0).amm.feePool.scaledBalance;
678678
console.log('usdcBefore', usdcBefore.toString());
679679
console.log('usdcAfter', usdcAfter.toString());
680680
assert(usdcAfter.sub(usdcBefore).eq(QUOTE_PRECISION.muln(200)));
681681
assert(lpAumAfter.sub(lpAumBefore).eq(QUOTE_PRECISION.muln(200)));
682682
console.log('feePoolBalanceBefore', feePoolBalanceBefore.toString());
683683
console.log('feePoolBalanceAfter', feePoolBalanceAfter.toString());
684-
assert(feePoolBalanceAfter.sub(feePoolBalanceBefore).eq(SPOT_MARKET_BALANCE_PRECISION.muln(-100)));
684+
assert(
685+
feePoolBalanceAfter
686+
.sub(feePoolBalanceBefore)
687+
.eq(SPOT_MARKET_BALANCE_PRECISION.muln(-100))
688+
);
685689
});
686690

687691
it('can update and remove amm constituent mapping entries', async () => {

tests/overwritePerpAccounts.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ import { startAnchor } from 'solana-bankrun';
2121
import { TestBulkAccountLoader } from '../sdk/src/accounts/testBulkAccountLoader';
2222
import { BankrunContextWrapper } from '../sdk/src/bankrun/bankrunConnection';
2323
import dotenv from 'dotenv';
24-
import { CustomBorshAccountsCoder, CustomBorshCoder } from './customCoder';
24+
import {
25+
CustomBorshAccountsCoder,
26+
CustomBorshCoder,
27+
} from '../sdk/src/decode/customCoder';
2528
dotenv.config();
2629

2730
describe('Bankrun Overwrite Accounts', () => {

0 commit comments

Comments
 (0)