Skip to content

Commit

Permalink
Update v4-client-js/src/clients/composite-client.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-dydx authored Sep 28, 2023
1 parent 43f28ff commit 0de4f60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v4-client-js/src/clients/composite-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,15 +529,15 @@ export class CompositeClient {
throw new Error('goodTilTimeInSeconds must be set for LONG_TERM or CONDITIONAL order');
}
if (goodTilBlock !== 0) {
throw new Error('Stateful orders use GTBT instead of GTB.');
throw new Error('goodTIlBlock should be zero since LONG_TERM or CONDITIONAL orders use goodTilTimeInSeconds instead of goodTilBlock.');
}
goodTilBlockTime = this.calculateGoodTilBlockTime(goodTilTimeInSeconds);
} else {
if (goodTilBlock === 0) {
throw new Error('goodTilBlock must be set for SHORT_TERM order');
throw new Error('goodTilBlock must be non-zero for SHORT_TERM orders');
}
if (goodTilTimeInSeconds !== 0) {
throw new Error('Short term orders use GTB instead of GTBT.');
throw new Error('goodTilTimeInSeconds should be zero since SHORT_TERM orders use goodTilBlock instead of goodTilTimeInSeconds.');
}
}

Expand Down

0 comments on commit 0de4f60

Please sign in to comment.