diff --git a/package.json b/package.json index 2617079..5092920 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "license": "Apache-2.0", "dependencies": { - "@drift-labs/sdk": "2.49.0-beta.9", + "@drift-labs/sdk": "2.49.0-beta.10", "@opentelemetry/api": "^1.1.0", "@opentelemetry/auto-instrumentations-node": "^0.31.1", "@opentelemetry/exporter-prometheus": "^0.31.0", diff --git a/src/index.ts b/src/index.ts index 83a0197..44c2c72 100644 --- a/src/index.ts +++ b/src/index.ts @@ -260,11 +260,16 @@ const main = async () => { getSlot: () => orderSubscriber.getSlot(), }; } else { - const userMap = new UserMap( + const userMap = new UserMap({ driftClient, - driftClient.userAccountSubscriptionConfig, - false - ); + subscriptionConfig: { + type: 'websocket', + resubTimeoutMs: 30_000, + commitment: stateCommitment, + }, + skipInitialLoad: false, + includeIdle: false, + }); dlobProvider = getDLOBProviderFromUserMap(userMap); } diff --git a/src/publishers/dlobPublisher.ts b/src/publishers/dlobPublisher.ts index 3a86e1e..d174921 100644 --- a/src/publishers/dlobPublisher.ts +++ b/src/publishers/dlobPublisher.ts @@ -207,11 +207,16 @@ const main = async () => { getSlot: () => orderSubscriber.getSlot(), }; } else { - const userMap = new UserMap( + const userMap = new UserMap({ driftClient, - driftClient.userAccountSubscriptionConfig, - false - ); + subscriptionConfig: { + type: 'websocket', + resubTimeoutMs: 30_000, + commitment: stateCommitment, + }, + skipInitialLoad: false, + includeIdle: false, + }); dlobProvider = getDLOBProviderFromUserMap(userMap); } diff --git a/src/publishers/tradesPublisher.ts b/src/publishers/tradesPublisher.ts index 16d9542..5279e16 100644 --- a/src/publishers/tradesPublisher.ts +++ b/src/publishers/tradesPublisher.ts @@ -94,11 +94,16 @@ const main = async () => { await slotSubscriber.subscribe(); - const userMap = new UserMap( + const userMap = new UserMap({ driftClient, - driftClient.userAccountSubscriptionConfig, - false - ); + subscriptionConfig: { + type: 'websocket', + resubTimeoutMs: 30_000, + commitment: stateCommitment, + }, + skipInitialLoad: false, + includeIdle: false, + }); await userMap.subscribe(); const redisClient = new RedisClient(REDIS_HOST, REDIS_PORT, REDIS_PASSWORD); diff --git a/yarn.lock b/yarn.lock index e9597b2..b15edc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -87,10 +87,10 @@ enabled "2.0.x" kuler "^2.0.0" -"@drift-labs/sdk@2.49.0-beta.9": - version "2.49.0-beta.9" - resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.49.0-beta.9.tgz#9e46d2c28c7bc3bf7c0da6279fd04f5cd4788080" - integrity sha512-0OyJm17KV5BPwHSiTnQ2pzf+q/UzPAjIdJjdateAbzqxYTLzkasfFpesSfZBPLGvA3CWF1/jaFYXo7y5BEsQTQ== +"@drift-labs/sdk@2.49.0-beta.10": + version "2.49.0-beta.10" + resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.49.0-beta.10.tgz#0d2021daf10174c6d19a07a6e36e6271ea465ecf" + integrity sha512-jSSqinLAajbqG2DxRGblKPrflp7w3/oqQ+di5YXVRRexsKs43XBkoApTtsoRy5KpNB3pkG3em88iwdk99a7hJg== dependencies: "@coral-xyz/anchor" "0.28.1-beta.2" "@ellipsis-labs/phoenix-sdk" "^1.4.2"