aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts')
-rw-r--r--packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
index 35337fa35..27ecb8bde 100644
--- a/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/token_registry_wrapper.ts
@@ -1,12 +1,13 @@
import * as _ from 'lodash';
import {artifacts} from '../artifacts';
-import {Token, TokenMetadata, TokenRegistryContract, ZeroExError} from '../types';
+import {Token, TokenMetadata, ZeroExError} from '../types';
import {assert} from '../utils/assert';
import {constants} from '../utils/constants';
import {Web3Wrapper} from '../web3_wrapper';
import {ContractWrapper} from './contract_wrapper';
+import {TokenRegistryContract} from './generated/token_registry';
/**
* This class includes all the functionality related to interacting with the 0x Token Registry smart contract.
@@ -116,9 +117,12 @@ export class TokenRegistryWrapper extends ContractWrapper {
if (!_.isUndefined(this._tokenRegistryContractIfExists)) {
return this._tokenRegistryContractIfExists;
}
- const contractInstance = await this._instantiateContractIfExistsAsync<TokenRegistryContract>(
+ const web3ContractInstance = await this._instantiateContractIfExistsAsync(
artifacts.TokenRegistryArtifact, this._contractAddressIfExists,
);
+ const contractInstance = new TokenRegistryContract(
+ web3ContractInstance, this._web3Wrapper.getContractDefaults(),
+ );
this._tokenRegistryContractIfExists = contractInstance;
return this._tokenRegistryContractIfExists;
}