From 8796d61a303c98578df38a2b07b8513cb4165386 Mon Sep 17 00:00:00 2001 From: Chris Heaney Date: Wed, 29 Nov 2023 20:44:36 -0500 Subject: [PATCH] explicility set commitment for order subscriber --- src/index.ts | 2 ++ src/publishers/dlobPublisher.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 733b288..794e7af 100644 --- a/src/index.ts +++ b/src/index.ts @@ -229,11 +229,13 @@ const main = async () => { if (useWebsocket) { subscriptionConfig = { type: 'websocket', + commitment: stateCommitment, }; } else { subscriptionConfig = { type: 'polling', frequency: ORDERBOOK_UPDATE_INTERVAL, + commitment: stateCommitment, }; } diff --git a/src/publishers/dlobPublisher.ts b/src/publishers/dlobPublisher.ts index 1863256..0550c72 100644 --- a/src/publishers/dlobPublisher.ts +++ b/src/publishers/dlobPublisher.ts @@ -126,10 +126,12 @@ const main = async () => { if (useWebsocket) { subscriptionConfig = { type: 'websocket', + commitment: stateCommitment, }; } else { subscriptionConfig = { type: 'polling', + commitment: stateCommitment, frequency: ORDERBOOK_UPDATE_INTERVAL, }; }