diff --git a/packages/asset-buyer/src/quote_consumers/forwarder_swap_quote_consumer.ts b/packages/asset-buyer/src/quote_consumers/forwarder_swap_quote_consumer.ts index f179164e0b..fc540c7214 100644 --- a/packages/asset-buyer/src/quote_consumers/forwarder_swap_quote_consumer.ts +++ b/packages/asset-buyer/src/quote_consumers/forwarder_swap_quote_consumer.ts @@ -19,6 +19,7 @@ import { import { affiliateFeeUtils } from '../utils/affiliate_fee_utils'; import { assert } from '../utils/assert'; import { assetDataUtils } from '../utils/asset_data_utils'; +import { SwapQuoteConsumerUtils } from '../utils/swap_quote_consumer_utils'; import { utils } from '../utils/utils'; export class ForwarderSwapQuoteConsumer implements SwapQuoteConsumer { @@ -164,7 +165,7 @@ export class ForwarderSwapQuoteConsumer implements SwapQuoteConsumer): Promise { - if (opts.takerAddress !== undefined) { - return opts.takerAddress; - } else { - const web3Wrapper = new Web3Wrapper(this.provider); - const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); - const firstAvailableAddress = _.head(availableAddresses); - if (firstAvailableAddress !== undefined) { - return firstAvailableAddress; - } else { - throw new Error(SwapQuoteConsumerError.NoAddressAvailable); - } - } - } - - /** - * Get the assetData that represents the WETH token. - * Will throw if WETH does not exist for the current network. - */ private _getEtherTokenAssetDataOrThrow(): string { return assetDataUtils.getEtherTokenAssetData(this._contractWrappers); }