aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant')
-rw-r--r--packages/instant/src/types.ts16
1 files changed, 4 insertions, 12 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts
index ad8794c94..63b49cb26 100644
--- a/packages/instant/src/types.ts
+++ b/packages/instant/src/types.ts
@@ -16,22 +16,14 @@ export enum OrderProcessState {
FAILURE = 'Failure',
}
-interface RegularOrderState {
+interface OrderStateWithoutTx {
processState: OrderProcessState.NONE | OrderProcessState.AWAITING_SIGNATURE;
}
-interface ProcessingOrderState {
- processState: OrderProcessState.PROCESSING;
+interface OrderStateWithTx {
+ processState: OrderProcessState.PROCESSING | OrderProcessState.SUCCESS | OrderProcessState.FAILURE;
txHash: string;
}
-interface SuccessfulOrderState {
- processState: OrderProcessState.SUCCESS;
- txHash: string;
-}
-interface FailureOrderState {
- processState: OrderProcessState.FAILURE;
- txHash: string;
-}
-export type OrderState = RegularOrderState | ProcessingOrderState | SuccessfulOrderState | FailureOrderState;
+export type OrderState = OrderStateWithoutTx | OrderStateWithTx;
export enum DisplayStatus {
Present,