aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-03-24 06:33:49 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:17 +0800
commit3541f5e1dac692fa12fafd4822dc98aa7afe5c1c (patch)
treeceb98de2233188ac0aad1f04cfa25a1290198290 /packages/contracts/src
parent8f809e3a292c55e0f6440f9cf7c8746ede7ad583 (diff)
downloaddexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.tar
dexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.tar.gz
dexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.tar.bz2
dexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.tar.lz
dexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.tar.xz
dexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.tar.zst
dexon-0x-contracts-3541f5e1dac692fa12fafd4822dc98aa7afe5c1c.zip
Separate filled/cancelled errors
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/LibErrors.sol3
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol4
-rw-r--r--packages/contracts/src/utils/types.ts3
3 files changed, 6 insertions, 4 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/LibErrors.sol b/packages/contracts/src/contracts/current/protocol/Exchange/LibErrors.sol
index 08a578c93..7fa9d4860 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/LibErrors.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/LibErrors.sol
@@ -24,7 +24,8 @@ contract LibErrors {
// Error Codes
enum Errors {
ORDER_EXPIRED, // Order has already expired
- ORDER_FULLY_FILLED_OR_CANCELLED, // Order has already been fully filled or cancelled
+ ORDER_FULLY_FILLED, // Order has already been fully filled
+ ORDER_CANCELLED, // Order has already been cancelled
ROUNDING_ERROR_TOO_LARGE, // Rounding error too large
INSUFFICIENT_BALANCE_OR_ALLOWANCE // Insufficient balance or allowance for token transfer
}
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol
index a0603ec78..a42519850 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol
@@ -94,7 +94,7 @@ contract MixinExchangeCore is
// Check if order has been cancelled
if (cancelled[orderHash]) {
- LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), orderHash);
+ LogError(uint8(Errors.ORDER_CANCELLED), orderHash);
return 0;
}
@@ -182,7 +182,7 @@ contract MixinExchangeCore is
}
if (cancelled[orderHash]) {
- LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), orderHash);
+ LogError(uint8(Errors.ORDER_CANCELLED), orderHash);
return false;
}
diff --git a/packages/contracts/src/utils/types.ts b/packages/contracts/src/utils/types.ts
index 460d0a58a..ce87e9851 100644
--- a/packages/contracts/src/utils/types.ts
+++ b/packages/contracts/src/utils/types.ts
@@ -75,7 +75,8 @@ export interface TokenInfoByNetwork {
export enum ExchangeContractErrs {
ERROR_ORDER_EXPIRED,
- ERROR_ORDER_FULLY_FILLED_OR_CANCELLED,
+ ERROR_ORDER_FULLY_FILLED,
+ ERROR_ORDER_CANCELLED,
ERROR_ROUNDING_ERROR_TOO_LARGE,
ERROR_INSUFFICIENT_BALANCE_OR_ALLOWANCE,
}