Skip to content

Commit b1b9c4f

Browse files
committed
fix prettier
1 parent 7488419 commit b1b9c4f

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

sdk/src/driftClient.ts

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ export class DriftClient {
349349
this.authoritySubAccountMap = config.authoritySubAccountMap
350350
? config.authoritySubAccountMap
351351
: config.subAccountIds
352-
? new Map([[this.authority.toString(), config.subAccountIds]])
353-
: new Map<string, number[]>();
352+
? new Map([[this.authority.toString(), config.subAccountIds]])
353+
: new Map<string, number[]>();
354354

355355
this.includeDelegates = config.includeDelegates ?? false;
356356
if (config.accountSubscription?.type === 'polling') {
@@ -840,8 +840,8 @@ export class DriftClient {
840840
this.authoritySubAccountMap = authoritySubaccountMap
841841
? authoritySubaccountMap
842842
: subAccountIds
843-
? new Map([[this.authority.toString(), subAccountIds]])
844-
: new Map<string, number[]>();
843+
? new Map([[this.authority.toString(), subAccountIds]])
844+
: new Map<string, number[]>();
845845

846846
/* Reset user stats account */
847847
if (this.userStats?.isSubscribed) {
@@ -3328,15 +3328,15 @@ export class DriftClient {
33283328
marketIndex,
33293329
fromSubAccountId,
33303330
subAccountId
3331-
)
3331+
)
33323332
: await this.getDepositInstruction(
33333333
amount,
33343334
marketIndex,
33353335
userTokenAccount,
33363336
subAccountId,
33373337
false,
33383338
false
3339-
);
3339+
);
33403340

33413341
if (subAccountId === 0) {
33423342
if (
@@ -4379,11 +4379,11 @@ export class DriftClient {
43794379
[orderParams, ...bracketOrdersParams],
43804380
positionMaxLev,
43814381
userAccount.subAccountId
4382-
)
4382+
)
43834383
: this.getPlaceOrdersIx(
43844384
[orderParams, ...bracketOrdersParams],
43854385
userAccount.subAccountId
4386-
);
4386+
);
43874387

43884388
ixPromisesForTxs.marketOrderTx = marketOrderTxIxs;
43894389

@@ -4534,7 +4534,7 @@ export class DriftClient {
45344534
this.program.programId,
45354535
this.authority,
45364536
subAccountId
4537-
)
4537+
)
45384538
: await this.getUserAccountPublicKey(subAccountId);
45394539

45404540
const remainingAccounts = this.getRemainingAccounts({
@@ -5172,13 +5172,13 @@ export class DriftClient {
51725172
? order.marketIndex
51735173
: userAccount.orders.find(
51745174
(order) => order.orderId === userAccount.nextOrderId - 1
5175-
).marketIndex;
5175+
).marketIndex;
51765176

51775177
makerInfo = Array.isArray(makerInfo)
51785178
? makerInfo
51795179
: makerInfo
5180-
? [makerInfo]
5181-
: [];
5180+
? [makerInfo]
5181+
: [];
51825182

51835183
const userAccounts = [userAccount];
51845184
for (const maker of makerInfo) {
@@ -5317,8 +5317,9 @@ export class DriftClient {
53175317
subAccountId?: number
53185318
): Promise<TransactionInstruction> {
53195319
orderParams = getOrderParams(orderParams, { marketType: MarketType.SPOT });
5320-
const userAccountPublicKey =
5321-
await this.getUserAccountPublicKey(subAccountId);
5320+
const userAccountPublicKey = await this.getUserAccountPublicKey(
5321+
subAccountId
5322+
);
53225323

53235324
const remainingAccounts = this.getRemainingAccounts({
53245325
userAccounts: [this.getUserAccount(subAccountId)],
@@ -5394,13 +5395,13 @@ export class DriftClient {
53945395
? order.marketIndex
53955396
: userAccount.orders.find(
53965397
(order) => order.orderId === userAccount.nextOrderId - 1
5397-
).marketIndex;
5398+
).marketIndex;
53985399

53995400
makerInfo = Array.isArray(makerInfo)
54005401
? makerInfo
54015402
: makerInfo
5402-
? [makerInfo]
5403-
: [];
5403+
? [makerInfo]
5404+
: [];
54045405

54055406
const userAccounts = [userAccount];
54065407
for (const maker of makerInfo) {
@@ -6628,8 +6629,9 @@ export class DriftClient {
66286629

66296630
const prepSettlePnlTx = async () => {
66306631
if (settlePnl && isVariant(orderParams.marketType, 'perp')) {
6631-
const userAccountPublicKey =
6632-
await this.getUserAccountPublicKey(subAccountId);
6632+
const userAccountPublicKey = await this.getUserAccountPublicKey(
6633+
subAccountId
6634+
);
66336635

66346636
const settlePnlIx = await this.settlePNLIx(
66356637
userAccountPublicKey,
@@ -6738,8 +6740,8 @@ export class DriftClient {
67386740
makerInfo = Array.isArray(makerInfo)
67396741
? makerInfo
67406742
: makerInfo
6741-
? [makerInfo]
6742-
: [];
6743+
? [makerInfo]
6744+
: [];
67436745

67446746
const userAccounts = [this.getUserAccount(subAccountId)];
67456747
for (const maker of makerInfo) {
@@ -6987,11 +6989,11 @@ export class DriftClient {
69876989
? this.program.coder.types.encode(
69886990
'SignedMsgOrderParamsDelegateMessage',
69896991
withBuilderDefaults as SignedMsgOrderParamsDelegateMessage
6990-
)
6992+
)
69916993
: this.program.coder.types.encode(
69926994
'SignedMsgOrderParamsMessage',
69936995
withBuilderDefaults as SignedMsgOrderParamsMessage
6994-
),
6996+
),
69956997
]);
69966998
return buf;
69976999
}
@@ -9661,8 +9663,9 @@ export class DriftClient {
96619663
}
96629664

96639665
if (initializeStakeAccount) {
9664-
const initializeIx =
9665-
await this.getInitializeInsuranceFundStakeIx(marketIndex);
9666+
const initializeIx = await this.getInitializeInsuranceFundStakeIx(
9667+
marketIndex
9668+
);
96669669
addIfStakeIxs.push(initializeIx);
96679670
}
96689671

@@ -10710,7 +10713,7 @@ export class DriftClient {
1071010713
const remainingAccounts = userAccount
1071110714
? this.getRemainingAccounts({
1071210715
userAccounts: [userAccount],
10713-
})
10716+
})
1071410717
: undefined;
1071510718

1071610719
const ix = await this.program.instruction.disableUserHighLeverageMode(

0 commit comments

Comments
 (0)