From 63dc606a9c08dad5e0aae09b86178fcd3e78e867 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 16:50:14 -0600 Subject: Make getZRXTokenAddress non async --- packages/0x.js/src/contract_wrappers/token_wrapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/0x.js/src/contract_wrappers/token_wrapper.ts') diff --git a/packages/0x.js/src/contract_wrappers/token_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_wrapper.ts index 4b89d3cfc..5fd3a2a5d 100644 --- a/packages/0x.js/src/contract_wrappers/token_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/token_wrapper.ts @@ -76,8 +76,8 @@ export class TokenWrapper extends ContractWrapper { // Hack: for some reason default estimated gas amount causes `base fee exceeds gas limit` exception // on testrpc. Probably related to https://github.com/ethereumjs/testrpc/issues/294 // TODO: Debug issue in testrpc and submit a PR, then remove this hack - const networkIdIfExists = await this._web3Wrapper.getNetworkIdIfExistsAsync(); - const gas = networkIdIfExists === constants.TESTRPC_NETWORK_ID ? ALLOWANCE_TO_ZERO_GAS_AMOUNT : undefined; + const networkId = this._web3Wrapper.getNetworkId(); + const gas = networkId === constants.TESTRPC_NETWORK_ID ? ALLOWANCE_TO_ZERO_GAS_AMOUNT : undefined; const txHash = await tokenContract.approve.sendTransactionAsync(spenderAddress, amountInBaseUnits, { from: ownerAddress, gas, -- cgit