aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-30 17:34:07 +0800
committerFabio Berger <me@fabioberger.com>2017-10-31 00:49:16 +0800
commit26394813f4824590bac00da05ab1026aa360c77f (patch)
treeedeec2895cccc4def628ef99212255e38752cc0d /src
parentf21f42f11ed11ef7b4e8ec7de1281150bf8b695c (diff)
downloaddexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.tar
dexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.tar.gz
dexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.tar.bz2
dexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.tar.lz
dexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.tar.xz
dexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.tar.zst
dexon-sol-tools-26394813f4824590bac00da05ab1026aa360c77f.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;