Skip to content

Commit 26f72e3

Browse files
committed
fix: lint and prettify
1 parent 74757bf commit 26f72e3

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

sdk/src/accounts/grpcDriftClientAccountSubscriber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,4 @@ export class grpcDriftClientAccountSubscriber extends WebSocketDriftClientAccoun
204204
this.oracleSubscribers.set(oracleId, accountSubscriber);
205205
return true;
206206
}
207-
}
207+
}

sdk/src/accounts/grpcDriftClientAccountSubscriberV2.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,15 @@ export class grpcDriftClientAccountSubscriberV2 extends WebSocketDriftClientAcco
141141
async () => {
142142
try {
143143
if (this.resubOpts?.logResubMessages) {
144-
console.log('[grpcDriftClientAccountSubscriberV2] perp markets subscriber unsubscribed; resubscribing');
144+
console.log(
145+
'[grpcDriftClientAccountSubscriberV2] perp markets subscriber unsubscribed; resubscribing'
146+
);
145147
}
146148
await this.subscribeToPerpMarketAccounts();
147149
} catch (e) {
148150
console.error('Perp markets resubscribe failed:', e);
149151
}
150152
}
151-
152153
);
153154
await this.perpMarketsSubscriber.subscribe(
154155
perpMarketPubkeys,
@@ -182,7 +183,9 @@ export class grpcDriftClientAccountSubscriberV2 extends WebSocketDriftClientAcco
182183
async () => {
183184
try {
184185
if (this.resubOpts?.logResubMessages) {
185-
console.log('[grpcDriftClientAccountSubscriberV2] spot markets subscriber unsubscribed; resubscribing');
186+
console.log(
187+
'[grpcDriftClientAccountSubscriberV2] spot markets subscriber unsubscribed; resubscribing'
188+
);
186189
}
187190
await this.subscribeToSpotMarketAccounts();
188191
} catch (e) {
@@ -249,7 +252,9 @@ export class grpcDriftClientAccountSubscriberV2 extends WebSocketDriftClientAcco
249252
async () => {
250253
try {
251254
if (this.resubOpts?.logResubMessages) {
252-
console.log('[grpcDriftClientAccountSubscriberV2] oracle subscriber unsubscribed; resubscribing');
255+
console.log(
256+
'[grpcDriftClientAccountSubscriberV2] oracle subscriber unsubscribed; resubscribing'
257+
);
253258
}
254259
await this.subscribeToOracles();
255260
} catch (e) {
@@ -267,7 +272,6 @@ export class grpcDriftClientAccountSubscriberV2 extends WebSocketDriftClientAcco
267272
}
268273
);
269274

270-
271275
return true;
272276
}
273277

@@ -280,7 +284,7 @@ export class grpcDriftClientAccountSubscriberV2 extends WebSocketDriftClientAcco
280284
await super.unsubscribeFromOracles();
281285
}
282286

283-
override async unsubscribe(): Promise<void> {
287+
override async unsubscribe(): Promise<void> {
284288
if (this.isSubscribed) {
285289
return;
286290
}

sdk/src/accounts/grpcMultiAccountSubscriber.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export class grpcMultiAccountSubscriber<T> {
297297
this.isUnsubscribing = false;
298298
}
299299

300-
if(this.onUnsubscribe) {
300+
if (this.onUnsubscribe) {
301301
try {
302302
await this.onUnsubscribe();
303303
} catch (e) {

sdk/src/driftClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ import {
190190
import pythSolanaReceiverIdl from './idl/pyth_solana_receiver.json';
191191
import { asV0Tx, PullFeed, AnchorUtils } from '@switchboard-xyz/on-demand';
192192
import { grpcDriftClientAccountSubscriber } from './accounts/grpcDriftClientAccountSubscriber';
193-
import { grpcDriftClientAccountSubscriberV2 } from './accounts/grpcDriftClientAccountSubscriberV2';
194193
import nacl from 'tweetnacl';
195194
import { Slothash } from './slot/SlothashSubscriber';
196195
import { getOracleId } from './oracles/oracleId';

sdk/src/isomorphic/grpc.node.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import type {
66
import { CommitmentLevel } from '@triton-one/yellowstone-grpc';
77
import type { ClientDuplexStream, ChannelOptions } from '@grpc/grpc-js';
88

9-
import { CommitmentLevel as LaserCommitmentLevel, subscribe as LaserSubscribe, CompressionAlgorithms } from 'helius-laserstream';
9+
import {
10+
CommitmentLevel as LaserCommitmentLevel,
11+
subscribe as LaserSubscribe,
12+
CompressionAlgorithms,
13+
} from 'helius-laserstream';
1014
import type {
1115
LaserstreamConfig,
1216
SubscribeRequest as LaserSubscribeRequest,

0 commit comments

Comments
 (0)