diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-10-25 03:53:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 03:53:18 +0800 |
commit | 059868e9942fed4616750d212e706f09d17f397b (patch) | |
tree | 7c70fcd71641479479ff831e9e665f7b8e69fa30 /packages/instant/src/types.ts | |
parent | 06ba26a6d30565e7c6c4032528089d30ecc39fdd (diff) | |
parent | 09f0bf7f0062bba51380ae904bff96baddf5f0f2 (diff) | |
download | dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.tar dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.tar.gz dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.tar.bz2 dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.tar.lz dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.tar.xz dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.tar.zst dexon-sol-tools-059868e9942fed4616750d212e706f09d17f397b.zip |
Merge pull request #1179 from 0xProject/feature/instant/processing-state
[instant] Success and Processing state
Diffstat (limited to 'packages/instant/src/types.ts')
-rw-r--r-- | packages/instant/src/types.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index c340623ad..c5521c63c 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -7,6 +7,20 @@ export enum AsyncProcessState { SUCCESS = 'Success', FAILURE = 'Failure', } + +interface RegularOrderState { + processState: AsyncProcessState.NONE | AsyncProcessState.PENDING; +} +interface SuccessfulOrderState { + processState: AsyncProcessState.SUCCESS; + txnHash: string; +} +interface FailureOrderState { + processState: AsyncProcessState.FAILURE; + txnHash?: string; +} +export type OrderState = RegularOrderState | SuccessfulOrderState | FailureOrderState; + export enum DisplayStatus { Present, Hidden, |