Skip to content

Commit c9cdab8

Browse files
authored
[TWAP] Add missing twap check (#483)
Add TWAP for check for `goodTilTimeInSeconds` (missed this in my last PR)
1 parent aa1e310 commit c9cdab8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

v4-client-js/src/clients/composite-client.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,11 @@ export class CompositeClient {
550550
);
551551
const orderTimeInForce = calculateTimeInForce(type, timeInForce, execution, postOnly);
552552
let goodTilBlockTime = 0;
553-
if (orderFlags === OrderFlags.LONG_TERM || orderFlags === OrderFlags.CONDITIONAL) {
553+
if (
554+
orderFlags === OrderFlags.LONG_TERM ||
555+
orderFlags === OrderFlags.CONDITIONAL ||
556+
orderFlags === OrderFlags.TWAP
557+
) {
554558
if (goodTilTimeInSeconds == null) {
555559
throw new Error('goodTilTimeInSeconds must be set for LONG_TERM or CONDITIONAL order');
556560
} else {

0 commit comments

Comments
 (0)