Skip to content

Commit eda792a

Browse files
committed
explicitly check for driftclient on startup
1 parent 3b291ac commit eda792a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ const runBot = async () => {
585585
});
586586

587587
let needDriftStateWatcher = false;
588+
let needDriftClient = false;
588589

589590
if (configHasBot(config, 'pythCranker')) {
590591
needPythPriceSubscriber = true;
@@ -605,7 +606,7 @@ const runBot = async () => {
605606
}
606607
if (configHasBot(config, 'pythLazerCranker')) {
607608
needPriorityFeeSubscriber = true;
608-
needDriftStateWatcher = true;
609+
needDriftClient = true;
609610

610611
bots.push(
611612
new PythLazerCrankerBot(
@@ -917,7 +918,7 @@ const runBot = async () => {
917918

918919
// Run subscribe functions once
919920
if (
920-
needCheckDriftUser ||
921+
(needDriftClient && needCheckDriftUser) ||
921922
needForceCollateral ||
922923
eventSubscriber ||
923924
needUserMapSubscribe ||

0 commit comments

Comments
 (0)