aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 04:34:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-05-30 04:35:17 +0800
commitb46ad44856fd3744d90562426356283c90db4fc1 (patch)
tree05ef0e9f1eac060039cdd241bddd8322a49b7a61 /src/contract_wrappers
parent96092de5cb97430af35a1c03f22fdc34d7100107 (diff)
downloaddexon-0x-contracts-b46ad44856fd3744d90562426356283c90db4fc1.tar.gz
dexon-0x-contracts-b46ad44856fd3744d90562426356283c90db4fc1.tar.zst
dexon-0x-contracts-b46ad44856fd3744d90562426356283c90db4fc1.zip
Move field declaration to the begining of the class
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index dfa639954..ce5a7b8f2 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -15,6 +15,14 @@ import {ContractResponse} from '../types';
import {constants} from '../utils/constants';
export class ExchangeWrapper extends ContractWrapper {
+ private exchangeContractErrToMsg = {
+ [ExchangeContractErrs.ERROR_FILL_EXPIRED]: 'The order you attempted to fill is expired',
+ [ExchangeContractErrs.ERROR_CANCEL_EXPIRED]: 'The order you attempted to cancel is expired',
+ [ExchangeContractErrs.ERROR_FILL_NO_VALUE]: 'This order has already been filled or cancelled',
+ [ExchangeContractErrs.ERROR_CANCEL_NO_VALUE]: 'This order has already been filled or cancelled',
+ [ExchangeContractErrs.ERROR_FILL_TRUNCATION]: 'The rounding error was too large when filling this order',
+ [ExchangeContractErrs.ERROR_FILL_BALANCE_ALLOWANCE]: 'Maker or taker has insufficient balance or allowance',
+ };
constructor(web3Wrapper: Web3Wrapper) {
super(web3Wrapper);
}
@@ -85,14 +93,6 @@ export class ExchangeWrapper extends ContractWrapper {
}
return response;
}
- private exchangeContractErrToMsg = {
- [ExchangeContractErrs.ERROR_FILL_EXPIRED]: 'The order you attempted to fill is expired',
- [ExchangeContractErrs.ERROR_CANCEL_EXPIRED]: 'The order you attempted to cancel is expired',
- [ExchangeContractErrs.ERROR_FILL_NO_VALUE]: 'This order has already been filled or cancelled',
- [ExchangeContractErrs.ERROR_CANCEL_NO_VALUE]: 'This order has already been filled or cancelled',
- [ExchangeContractErrs.ERROR_FILL_TRUNCATION]: 'The rounding error was too large when filling this order',
- [ExchangeContractErrs.ERROR_FILL_BALANCE_ALLOWANCE]: 'Maker or taker has insufficient balance or allowance',
- };
private async getExchangeInstanceOrThrowAsync(): Promise<ExchangeContract> {
const contractInstance = await this.instantiateContractIfExistsAsync((ExchangeArtifacts as any));
return contractInstance as ExchangeContract;