Skip to content

Commit 28a2d0f

Browse files
committed
patch the patch
1 parent f73df1a commit 28a2d0f

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

sdk/src/driftClient.ts

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ export class DriftClient {
353353
this.authoritySubAccountMap = config.authoritySubAccountMap
354354
? config.authoritySubAccountMap
355355
: config.subAccountIds
356-
? new Map([[this.authority.toString(), config.subAccountIds]])
357-
: new Map<string, number[]>();
356+
? new Map([[this.authority.toString(), config.subAccountIds]])
357+
: new Map<string, number[]>();
358358

359359
this.includeDelegates = config.includeDelegates ?? false;
360360
if (config.accountSubscription?.type === 'polling') {
@@ -844,8 +844,8 @@ export class DriftClient {
844844
this.authoritySubAccountMap = authoritySubaccountMap
845845
? authoritySubaccountMap
846846
: subAccountIds
847-
? new Map([[this.authority.toString(), subAccountIds]])
848-
: new Map<string, number[]>();
847+
? new Map([[this.authority.toString(), subAccountIds]])
848+
: new Map<string, number[]>();
849849

850850
/* Reset user stats account */
851851
if (this.userStats?.isSubscribed) {
@@ -997,7 +997,7 @@ export class DriftClient {
997997
[...this.authoritySubAccountMap.values()][0][0] ?? 0,
998998
new PublicKey(
999999
[...this.authoritySubAccountMap.keys()][0] ??
1000-
this.authority.toString()
1000+
this.authority.toString()
10011001
)
10021002
);
10031003
}
@@ -3316,19 +3316,19 @@ export class DriftClient {
33163316

33173317
const depositCollateralIx = isFromSubaccount
33183318
? await this.getTransferDepositIx(
3319-
amount,
3320-
marketIndex,
3321-
fromSubAccountId,
3322-
subAccountId
3323-
)
3319+
amount,
3320+
marketIndex,
3321+
fromSubAccountId,
3322+
subAccountId
3323+
)
33243324
: await this.getDepositInstruction(
3325-
amount,
3326-
marketIndex,
3327-
userTokenAccount,
3328-
subAccountId,
3329-
false,
3330-
false
3331-
);
3325+
amount,
3326+
marketIndex,
3327+
userTokenAccount,
3328+
subAccountId,
3329+
false,
3330+
false
3331+
);
33323332

33333333
if (subAccountId === 0) {
33343334
if (
@@ -4368,14 +4368,14 @@ export class DriftClient {
43684368

43694369
const marketOrderTxIxs = positionMaxLev
43704370
? this.getPlaceOrdersAndSetPositionMaxLevIx(
4371-
[orderParams, ...bracketOrdersParams],
4372-
positionMaxLev,
4373-
userAccount.subAccountId
4374-
)
4371+
[orderParams, ...bracketOrdersParams],
4372+
positionMaxLev,
4373+
userAccount.subAccountId
4374+
)
43754375
: this.getPlaceOrdersIx(
4376-
[orderParams, ...bracketOrdersParams],
4377-
userAccount.subAccountId
4378-
);
4376+
[orderParams, ...bracketOrdersParams],
4377+
userAccount.subAccountId
4378+
);
43794379

43804380
ixPromisesForTxs.marketOrderTx = marketOrderTxIxs;
43814381

@@ -4523,10 +4523,10 @@ export class DriftClient {
45234523

45244524
const user = isDepositToTradeTx
45254525
? getUserAccountPublicKeySync(
4526-
this.program.programId,
4527-
this.authority,
4528-
subAccountId
4529-
)
4526+
this.program.programId,
4527+
this.authority,
4528+
subAccountId
4529+
)
45304530
: await this.getUserAccountPublicKey(subAccountId);
45314531

45324532
const remainingAccounts = this.getRemainingAccounts({
@@ -5163,14 +5163,14 @@ export class DriftClient {
51635163
const marketIndex = order
51645164
? order.marketIndex
51655165
: userAccount.orders.find(
5166-
(order) => order.orderId === userAccount.nextOrderId - 1
5167-
).marketIndex;
5166+
(order) => order.orderId === userAccount.nextOrderId - 1
5167+
).marketIndex;
51685168

51695169
makerInfo = Array.isArray(makerInfo)
51705170
? makerInfo
51715171
: makerInfo
5172-
? [makerInfo]
5173-
: [];
5172+
? [makerInfo]
5173+
: [];
51745174

51755175
const userAccounts = [userAccount];
51765176
for (const maker of makerInfo) {
@@ -5386,14 +5386,14 @@ export class DriftClient {
53865386
const marketIndex = order
53875387
? order.marketIndex
53885388
: userAccount.orders.find(
5389-
(order) => order.orderId === userAccount.nextOrderId - 1
5390-
).marketIndex;
5389+
(order) => order.orderId === userAccount.nextOrderId - 1
5390+
).marketIndex;
53915391

53925392
makerInfo = Array.isArray(makerInfo)
53935393
? makerInfo
53945394
: makerInfo
5395-
? [makerInfo]
5396-
: [];
5395+
? [makerInfo]
5396+
: [];
53975397

53985398
const userAccounts = [userAccount];
53995399
for (const maker of makerInfo) {
@@ -6732,8 +6732,8 @@ export class DriftClient {
67326732
makerInfo = Array.isArray(makerInfo)
67336733
? makerInfo
67346734
: makerInfo
6735-
? [makerInfo]
6736-
: [];
6735+
? [makerInfo]
6736+
: [];
67376737

67386738
const userAccounts = [this.getUserAccount(subAccountId)];
67396739
for (const maker of makerInfo) {
@@ -6979,13 +6979,13 @@ export class DriftClient {
69796979
prefix,
69806980
delegateSigner
69816981
? this.program.coder.types.encode(
6982-
'SignedMsgOrderParamsDelegateMessage',
6983-
withBuilderDefaults as SignedMsgOrderParamsDelegateMessage
6984-
)
6982+
'SignedMsgOrderParamsDelegateMessage',
6983+
withBuilderDefaults as SignedMsgOrderParamsDelegateMessage
6984+
)
69856985
: this.program.coder.types.encode(
6986-
'SignedMsgOrderParamsMessage',
6987-
withBuilderDefaults as SignedMsgOrderParamsMessage
6988-
),
6986+
'SignedMsgOrderParamsMessage',
6987+
withBuilderDefaults as SignedMsgOrderParamsMessage
6988+
),
69896989
]);
69906990
return buf;
69916991
}
@@ -9394,7 +9394,7 @@ export class DriftClient {
93949394
);
93959395

93969396
if (
9397-
!isOracleTooDivergent(
9397+
isOracleTooDivergent(
93989398
perpMarket.amm,
93999399
{
94009400
price: perpMarket.amm.mmOraclePrice,
@@ -10710,8 +10710,8 @@ export class DriftClient {
1071010710
): Promise<TransactionInstruction> {
1071110711
const remainingAccounts = userAccount
1071210712
? this.getRemainingAccounts({
10713-
userAccounts: [userAccount],
10714-
})
10713+
userAccounts: [userAccount],
10714+
})
1071510715
: undefined;
1071610716

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

0 commit comments

Comments
 (0)