diff options
Diffstat (limited to 'packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts index 33adc0a9b..c3df7d3eb 100644 --- a/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/token_transfer_proxy_wrapper.ts @@ -41,16 +41,10 @@ export class TokenTransferProxyWrapper extends ContractWrapper { * @returns The Ethereum address of the TokenTransferProxy contract being used. */ public getContractAddress(): string { - const networkId = this._web3Wrapper.getNetworkId(); - if (_.isUndefined(this._contractAddressIfExists)) { - const contractAddress = artifacts.TokenTransferProxyArtifact.networks[networkId].address; - if (_.isUndefined(contractAddress)) { - throw new Error(ZeroExError.ExchangeContractDoesNotExist); - } - return contractAddress; - } else { - return this._contractAddressIfExists; - } + const contractAddress = this._getContractAddress( + artifacts.TokenTransferProxyArtifact, this._contractAddressIfExists, + ); + return contractAddress; } private _invalidateContractInstance(): void { delete this._tokenTransferProxyContractIfExists; |