Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 committed Nov 26, 2024
1 parent 365a604 commit 0843dca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/composable/ConditionalOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
ConditionalOrderArguments,
ConditionalOrderParams,
ContextFactory,
IsNotValid,
IsValidResult,
OwnerContext,
PollParams,
Expand Down Expand Up @@ -96,7 +95,7 @@ export abstract class ConditionalOrder<D, S> {
assertIsValid(): void {
const isValidResult = this.isValid()
if (!isValidResult.isValid) {
throw new Error(`Invalid order: ${(isValidResult as IsNotValid).reason}`)
throw new Error(`Invalid order: ${isValidResult.reason}`)
}
}

Expand Down Expand Up @@ -257,7 +256,7 @@ export abstract class ConditionalOrder<D, S> {
if (!isValid.isValid) {
return {
result: PollResultCode.DONT_TRY_AGAIN,
reason: `InvalidConditionalOrder. Reason: ${(isValid as IsNotValid).reason}`,
reason: `InvalidConditionalOrder. Reason: ${isValid.reason}`,
}
}

Expand Down

0 comments on commit 0843dca

Please sign in to comment.