aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/exchange_wrapper.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-02 22:54:21 +0800
committerFabio Berger <me@fabioberger.com>2017-06-02 22:54:21 +0800
commitade42047436f8f81bcc158fdfdc297dc6a2b1f66 (patch)
tree13eafbe68c700d710d434f6f67a74927e645230b /src/contract_wrappers/exchange_wrapper.ts
parent00fde26a541797902e1732b0a978376c8960195e (diff)
downloaddexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.tar
dexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.tar.gz
dexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.tar.bz2
dexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.tar.lz
dexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.tar.xz
dexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.tar.zst
dexon-sol-tools-ade42047436f8f81bcc158fdfdc297dc6a2b1f66.zip
Improve error names and remove duplicate import
Diffstat (limited to 'src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index fa5c16485..93e49cf33 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -10,6 +10,7 @@ import {
OrderAddresses,
SignedOrder,
ContractEvent,
+ ContractResponse,
} from '../types';
import {assert} from '../utils/assert';
import {ContractWrapper} from './contract_wrapper';
@@ -17,18 +18,17 @@ import * as ExchangeArtifacts from '../artifacts/Exchange.json';
import {ecSignatureSchema} from '../schemas/ec_signature_schema';
import {signedOrderSchema} from '../schemas/order_schemas';
import {SchemaValidator} from '../utils/schema_validator';
-import {ContractResponse} from '../types';
import {constants} from '../utils/constants';
import {TokenWrapper} from './token_wrapper';
export class ExchangeWrapper extends ContractWrapper {
private exchangeContractErrCodesToMsg = {
- [ExchangeContractErrCodes.ERROR_FILL_EXPIRED]: ExchangeContractErrs.ORDER_EXPIRED,
- [ExchangeContractErrCodes.ERROR_CANCEL_EXPIRED]: ExchangeContractErrs.ORDER_EXPIRED,
+ [ExchangeContractErrCodes.ERROR_FILL_EXPIRED]: ExchangeContractErrs.ORDER_FILL_EXPIRED,
+ [ExchangeContractErrCodes.ERROR_CANCEL_EXPIRED]: ExchangeContractErrs.ORDER_FILL_EXPIRED,
[ExchangeContractErrCodes.ERROR_FILL_NO_VALUE]: ExchangeContractErrs.ORDER_REMAINING_FILL_AMOUNT_ZERO,
[ExchangeContractErrCodes.ERROR_CANCEL_NO_VALUE]: ExchangeContractErrs.ORDER_REMAINING_FILL_AMOUNT_ZERO,
- [ExchangeContractErrCodes.ERROR_FILL_TRUNCATION]: ExchangeContractErrs.ORDER_ROUNDING_ERROR,
- [ExchangeContractErrCodes.ERROR_FILL_BALANCE_ALLOWANCE]: ExchangeContractErrs.ORDER_BALANCE_ALLOWANCE_ERROR,
+ [ExchangeContractErrCodes.ERROR_FILL_TRUNCATION]: ExchangeContractErrs.ORDER_FILL_ROUNDING_ERROR,
+ [ExchangeContractErrCodes.ERROR_FILL_BALANCE_ALLOWANCE]: ExchangeContractErrs.FILL_BALANCE_ALLOWANCE_ERROR,
};
private exchangeContractIfExists?: ExchangeContract;
private tokenWrapper: TokenWrapper;