Skip to content

Commit

Permalink
make slot subscriber mandatory for swift order subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
NourAlharithi committed Jan 15, 2025
1 parent 2bd3fe3 commit 58e91e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ts/sdk/src/jitter/baseJitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ export abstract class BaseJitter {
);
this.slotSubscriber = slotSubscriber;
this.swiftOrderSubscriber = swiftOrderSubscriber;

if (this.swiftOrderSubscriber && !this.slotSubscriber) {
throw new Error('Slot subscriber is required for swift order subscriber');
}
}

async subscribe(): Promise<void> {
Expand Down

0 comments on commit 58e91e9

Please sign in to comment.