From eb667f653c4ee87132390844afaecf409c7575c8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 1 Dec 2017 22:47:05 -0600 Subject: Adjust 0x.js to use generated wrappers --- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/0x.js/src/contract_wrappers/exchange_wrapper.ts') diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 273b348ff..aaf6256a3 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -9,7 +9,6 @@ import { DecodedLogArgs, ECSignature, EventCallback, - ExchangeContract, ExchangeContractErrCodes, ExchangeContractErrs, ExchangeContractEventArgs, @@ -40,6 +39,7 @@ import {utils} from '../utils/utils'; import {Web3Wrapper} from '../web3_wrapper'; import {ContractWrapper} from './contract_wrapper'; +import {ExchangeContract} from './generated/exchange'; import {TokenWrapper} from './token_wrapper'; const SHOULD_VALIDATE_BY_DEFAULT = true; @@ -789,9 +789,10 @@ export class ExchangeWrapper extends ContractWrapper { if (!_.isUndefined(this._exchangeContractIfExists)) { return this._exchangeContractIfExists; } - const contractInstance = await this._instantiateContractIfExistsAsync( + const web3ContractInstance = await this._instantiateContractIfExistsAsync( artifacts.ExchangeArtifact, this._contractAddressIfExists, ); + const contractInstance = new ExchangeContract(web3ContractInstance, this._web3Wrapper.getContractDefaults()); this._exchangeContractIfExists = contractInstance; return this._exchangeContractIfExists; } -- cgit v1.2.3