From 26394813f4824590bac00da05ab1026aa360c77f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 30 Oct 2017 11:34:07 +0200 Subject: Add types for order state watcher --- src/types.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/types.ts b/src/types.ts index 1b32ccdf9..ea83c6885 100644 --- a/src/types.ts +++ b/src/types.ts @@ -474,3 +474,24 @@ export enum TransferType { Trade = 'trade', Fee = 'fee', } + +export interface OrderStateValid { + isValid: true; + orderHash: string; + makerBalance: BigNumber; + makerAllowance: BigNumber; + makerFeeBalance: BigNumber; + makerFeeAllowance: BigNumber; + filledMakerTokenAmount: BigNumber; + cancelledMakerTokenAmount: BigNumber; +} + +export interface OrderStateInvalid { + isValid: false; + orderHash: string; + error: ExchangeContractErrs; +} + +export type OnOrderFillabilityStateChangeCallback = ( + orderState: OrderStateValid|OrderStateInvalid, +) => void; -- cgit