Skip to content

Commit

Permalink
Merge pull request #14 from drift-labs/polling-patch
Browse files Browse the repository at this point in the history
polling patch
  • Loading branch information
NourAlharithi authored Nov 11, 2023
2 parents 384e785 + 76d9791 commit 2f3b5d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,19 @@ const main = async () => {
commitment: stateCommitment,
});

const bulkAccountLoader = new BulkAccountLoader(
connection,
stateCommitment,
ORDERBOOK_UPDATE_INTERVAL
);

driftClient = new DriftClient({
connection,
wallet,
programID: clearingHousePublicKey,
accountSubscription: {
type: 'websocket',
resubTimeoutMs: 60000,
type: 'polling',
accountLoader: bulkAccountLoader,
},
env: driftEnv,
userStats: true,
Expand Down

0 comments on commit 2f3b5d4

Please sign in to comment.