diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-05-30 13:09:57 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-06-05 06:55:28 +0800 |
commit | 342432dc76d1bfc2531fb2edef77afc523eacefe (patch) | |
tree | a6676f58cfe204c30a96524008900ece8d232f53 /packages/contracts/src/utils | |
parent | 79472552aae4ef60ae20e26571c750cbeb02c552 (diff) | |
download | dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.tar dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.tar.gz dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.tar.bz2 dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.tar.lz dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.tar.xz dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.tar.zst dexon-sol-tools-342432dc76d1bfc2531fb2edef77afc523eacefe.zip |
Update Exchange statuses, revert instead of emmitting event on fill/cancel failures, and remove redundant logic in matchOrders
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r-- | packages/contracts/src/utils/match_order_tester.ts | 1 | ||||
-rw-r--r-- | packages/contracts/src/utils/types.ts | 22 |
2 files changed, 7 insertions, 16 deletions
diff --git a/packages/contracts/src/utils/match_order_tester.ts b/packages/contracts/src/utils/match_order_tester.ts index 09c0d8083..6170188bc 100644 --- a/packages/contracts/src/utils/match_order_tester.ts +++ b/packages/contracts/src/utils/match_order_tester.ts @@ -26,7 +26,6 @@ import { ContractName, ERC20BalancesByOwner, ERC721TokenIdsByOwner, - ExchangeStatus, TransferAmountsByMatchOrders as TransferAmounts, } from '../utils/types'; import { provider, web3Wrapper } from '../utils/web3_wrapper'; diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts index 6340c4a51..360e1fdbc 100644 --- a/packages/contracts/src/utils/types.ts +++ b/packages/contracts/src/utils/types.ts @@ -69,22 +69,14 @@ export interface Token { swarmHash: string; } -export enum ExchangeStatus { +export enum OrderStatus { INVALID, - SUCCESS, - ROUNDING_ERROR_TOO_LARGE, - INSUFFICIENT_BALANCE_OR_ALLOWANCE, - TAKER_ASSET_FILL_AMOUNT_TOO_LOW, - INVALID_SIGNATURE, - INVALID_SENDER, - INVALID_TAKER, - INVALID_MAKER, - ORDER_INVALID_MAKER_ASSET_AMOUNT, - ORDER_INVALID_TAKER_ASSET_AMOUNT, - ORDER_FILLABLE, - ORDER_EXPIRED, - ORDER_FULLY_FILLED, - ORDER_CANCELLED, + INVALID_MAKER_ASSET_AMOUNT, + INVALID_TAKER_ASSET_AMOUNT, + FILLABLE, + EXPIRED, + FULLY_FILLED, + CANCELLED, } export enum ContractName { |