explicility set commitment for order subscriber

This commit is contained in:
Chris Heaney
2023-11-29 20:44:36 -05:00
parent e71256eb32
commit 8796d61a30
2 changed files with 4 additions and 0 deletions

View File

@@ -229,11 +229,13 @@ const main = async () => {
if (useWebsocket) {
subscriptionConfig = {
type: 'websocket',
commitment: stateCommitment,
};
} else {
subscriptionConfig = {
type: 'polling',
frequency: ORDERBOOK_UPDATE_INTERVAL,
commitment: stateCommitment,
};
}

View File

@@ -126,10 +126,12 @@ const main = async () => {
if (useWebsocket) {
subscriptionConfig = {
type: 'websocket',
commitment: stateCommitment,
};
} else {
subscriptionConfig = {
type: 'polling',
commitment: stateCommitment,
frequency: ORDERBOOK_UPDATE_INTERVAL,
};
}