aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 19:46:13 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 19:46:13 +0800
commit92b101fac8c602e095b864fb72a241ec8c101f2b (patch)
tree6f2ae2e1fe1063455bb4b6f31ce944033b72f273 /src/contract_wrappers
parent78c46d7cc98fdd1e383a22adcd66a916301e2242 (diff)
downloaddexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.tar
dexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.tar.gz
dexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.tar.bz2
dexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.tar.lz
dexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.tar.xz
dexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.tar.zst
dexon-sol-tools-92b101fac8c602e095b864fb72a241ec8c101f2b.zip
Remove unused code
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index fbb2c710f..d4daa34a2 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -42,14 +42,6 @@ import * as ExchangeArtifacts from '../artifacts/Exchange.json';
* events of the 0x Exchange smart contract.
*/
export class ExchangeWrapper extends ContractWrapper {
- private _exchangeContractErrCodesToMsg = {
- [ExchangeContractErrCodes.ERROR_FILL_EXPIRED]: ExchangeContractErrs.OrderFillExpired,
- [ExchangeContractErrCodes.ERROR_CANCEL_EXPIRED]: ExchangeContractErrs.OrderFillExpired,
- [ExchangeContractErrCodes.ERROR_FILL_NO_VALUE]: ExchangeContractErrs.OrderRemainingFillAmountZero,
- [ExchangeContractErrCodes.ERROR_CANCEL_NO_VALUE]: ExchangeContractErrs.OrderRemainingFillAmountZero,
- [ExchangeContractErrCodes.ERROR_FILL_TRUNCATION]: ExchangeContractErrs.OrderFillRoundingError,
- [ExchangeContractErrCodes.ERROR_FILL_BALANCE_ALLOWANCE]: ExchangeContractErrs.FillBalanceAllowanceError,
- };
private _exchangeContractIfExists?: ExchangeContract;
private _exchangeLogEventEmitters: ContractEventEmitter[];
private _orderValidationUtils: OrderValidationUtils;
@@ -709,14 +701,6 @@ export class ExchangeWrapper extends ContractWrapper {
const orderHashHex = await exchangeInstance.getOrderHash.callAsync(orderAddresses, orderValues);
return orderHashHex;
}
- private _throwErrorLogsAsErrors(logs: ContractEvent[]): void {
- const errEvent = _.find(logs, {event: 'LogError'});
- if (!_.isUndefined(errEvent)) {
- const errCode = (errEvent.args as LogErrorContractEventArgs).errorId.toNumber();
- const errMessage = this._exchangeContractErrCodesToMsg[errCode];
- throw new Error(errMessage);
- }
- }
private async _getExchangeContractAsync(): Promise<ExchangeContract> {
if (!_.isUndefined(this._exchangeContractIfExists)) {
return this._exchangeContractIfExists;