diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/0x.ts | 3 | ||||
-rw-r--r-- | src/contract_wrappers/contract_wrapper.ts | 4 | ||||
-rw-r--r-- | src/contract_wrappers/ether_token_wrapper.ts | 2 | ||||
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 2 | ||||
-rw-r--r-- | src/contract_wrappers/token_registry_wrapper.ts | 2 | ||||
-rw-r--r-- | src/contract_wrappers/token_wrapper.ts | 2 |
6 files changed, 6 insertions, 9 deletions
@@ -164,9 +164,6 @@ export class ZeroEx { */ constructor(provider: Web3Provider, gasPrice?: BigNumber.BigNumber) { this._web3Wrapper = new Web3Wrapper(provider); - if (_.isUndefined(gasPrice)) { - gasPrice = this._web3Wrapper.toWei(new BigNumber(21), 'gwei'); - } this.token = new TokenWrapper(this._web3Wrapper, gasPrice); this.proxy = new TokenTransferProxyWrapper(this._web3Wrapper, gasPrice); this.exchange = new ExchangeWrapper(this._web3Wrapper, this.token, gasPrice); diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts index 015ed275a..28df82cee 100644 --- a/src/contract_wrappers/contract_wrapper.ts +++ b/src/contract_wrappers/contract_wrapper.ts @@ -6,8 +6,8 @@ import {utils} from '../utils/utils'; export class ContractWrapper { protected _web3Wrapper: Web3Wrapper; - private _gasPrice: BigNumber.BigNumber; - constructor(web3Wrapper: Web3Wrapper, gasPrice: BigNumber.BigNumber) { + private _gasPrice?: BigNumber.BigNumber; + constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) { this._web3Wrapper = web3Wrapper; this._gasPrice = gasPrice; } diff --git a/src/contract_wrappers/ether_token_wrapper.ts b/src/contract_wrappers/ether_token_wrapper.ts index eae84feec..3c282510f 100644 --- a/src/contract_wrappers/ether_token_wrapper.ts +++ b/src/contract_wrappers/ether_token_wrapper.ts @@ -13,7 +13,7 @@ import * as EtherTokenArtifacts from '../artifacts/EtherToken.json'; export class EtherTokenWrapper extends ContractWrapper { private _etherTokenContractIfExists?: EtherTokenContract; private _tokenWrapper: TokenWrapper; - constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice: BigNumber.BigNumber) { + constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice?: BigNumber.BigNumber) { super(web3Wrapper, gasPrice); this._tokenWrapper = tokenWrapper; } diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts index 8ae51da43..d09df236b 100644 --- a/src/contract_wrappers/exchange_wrapper.ts +++ b/src/contract_wrappers/exchange_wrapper.ts @@ -73,7 +73,7 @@ export class ExchangeWrapper extends ContractWrapper { ]; return [orderAddresses, orderValues]; } - constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice: BigNumber.BigNumber) { + constructor(web3Wrapper: Web3Wrapper, tokenWrapper: TokenWrapper, gasPrice?: BigNumber.BigNumber) { super(web3Wrapper, gasPrice); this._tokenWrapper = tokenWrapper; this._orderValidationUtils = new OrderValidationUtils(tokenWrapper, this); diff --git a/src/contract_wrappers/token_registry_wrapper.ts b/src/contract_wrappers/token_registry_wrapper.ts index 5469b4a95..822e69460 100644 --- a/src/contract_wrappers/token_registry_wrapper.ts +++ b/src/contract_wrappers/token_registry_wrapper.ts @@ -11,7 +11,7 @@ import * as TokenRegistryArtifacts from '../artifacts/TokenRegistry.json'; */ export class TokenRegistryWrapper extends ContractWrapper { private _tokenRegistryContractIfExists?: TokenRegistryContract; - constructor(web3Wrapper: Web3Wrapper, gasPrice: BigNumber.BigNumber) { + constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) { super(web3Wrapper, gasPrice); } /** diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts index 24f56a24a..f7070f1f4 100644 --- a/src/contract_wrappers/token_wrapper.ts +++ b/src/contract_wrappers/token_wrapper.ts @@ -31,7 +31,7 @@ export class TokenWrapper extends ContractWrapper { public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS; private _tokenContractsByAddress: {[address: string]: TokenContract}; private _tokenLogEventEmitters: ContractEventEmitter[]; - constructor(web3Wrapper: Web3Wrapper, gasPrice: BigNumber.BigNumber) { + constructor(web3Wrapper: Web3Wrapper, gasPrice?: BigNumber.BigNumber) { super(web3Wrapper, gasPrice); this._tokenContractsByAddress = {}; this._tokenLogEventEmitters = []; |