diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-05-30 04:34:06 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-05-30 04:35:17 +0800 |
commit | b46ad44856fd3744d90562426356283c90db4fc1 (patch) | |
tree | 05ef0e9f1eac060039cdd241bddd8322a49b7a61 /src/contract_wrappers | |
parent | 96092de5cb97430af35a1c03f22fdc34d7100107 (diff) | |
download | dexon-sol-tools-b46ad44856fd3744d90562426356283c90db4fc1.tar dexon-sol-tools-b46ad44856fd3744d90562426356283c90db4fc1.tar.gz dexon-sol-tools-b46ad44856fd3744d90562426356283c90db4fc1.tar.bz2 dexon-sol-tools-b46ad44856fd3744d90562426356283c90db4fc1.tar.lz dexon-sol-tools-b46ad44856fd3744d90562426356283c90db4fc1.tar.xz dexon-sol-tools-b46ad44856fd3744d90562426356283c90db4fc1.tar.zst dexon-sol-tools-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.ts | 16 |
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; |