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 | |
parent | 247eefc33a3c936158c4d71e3cea905635d27a9b (diff) | |
download | dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.gz dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.bz2 dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.lz dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.xz dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.tar.zst dexon-sol-tools-84b8e77aaae3a2c6848bcd1ffab78a2de81e6138.zip |
Add types for order state watcher
-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; |