diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-30 17:34:07 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-10 03:11:45 +0800 |
commit | 84b8e77aaae3a2c6848bcd1ffab78a2de81e6138 (patch) | |
tree | a7a8bcb5dcb4983d8f535f399c5d2e1e112b6c98 /src | |
parent | 247eefc33a3c936158c4d71e3cea905635d27a9b (diff) | |
download | dexon-0x-contracts-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.gz dexon-0x-contracts-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.zst dexon-0x-contracts-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.zip |
Add types for order state watcher
Diffstat (limited to 'src')
-rw-r--r-- | src/types.ts | 21 |
1 files changed, 21 insertions, 0 deletions
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; |