aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-30 17:34:07 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-10 03:11:45 +0800
commit84b8e77aaae3a2c6848bcd1ffab78a2de81e6138 (patch)
treea7a8bcb5dcb4983d8f535f399c5d2e1e112b6c98 /src
parent247eefc33a3c936158c4d71e3cea905635d27a9b (diff)
downloaddexon-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.ts21
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;