This commit is contained in:
wphan
2023-12-06 07:11:57 -08:00
parent 9ea5505f27
commit 6e90a1d796
5 changed files with 32 additions and 17 deletions

View File

@@ -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",

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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"