diff options
Diffstat (limited to 'packages/contracts/src/utils')
-rw-r--r-- | packages/contracts/src/utils/core_combinatorial_utils.ts | 4 | ||||
-rw-r--r-- | packages/contracts/src/utils/exchange_wrapper.ts | 16 |
2 files changed, 4 insertions, 16 deletions
diff --git a/packages/contracts/src/utils/core_combinatorial_utils.ts b/packages/contracts/src/utils/core_combinatorial_utils.ts index 5b725fbe3..93f4fc79d 100644 --- a/packages/contracts/src/utils/core_combinatorial_utils.ts +++ b/packages/contracts/src/utils/core_combinatorial_utils.ts @@ -96,8 +96,8 @@ export async function coreCombinatorialUtilsFactoryAsync( zrxAssetData, ); const exchangeWrapper = new ExchangeWrapper(exchangeContract, provider); - await exchangeWrapper.registerAssetProxyAsync(AssetProxyId.ERC20, erc20Proxy.address, ownerAddress); - await exchangeWrapper.registerAssetProxyAsync(AssetProxyId.ERC721, erc721Proxy.address, ownerAddress); + await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, ownerAddress); + await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, ownerAddress); await web3Wrapper.awaitTransactionSuccessAsync( await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, { diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts index ad68c8ff4..baf967065 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -1,12 +1,10 @@ -import { AssetProxyId, SignedOrder } from '@0xproject/types'; +import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; -import * as _ from 'lodash'; import { ExchangeContract } from '../generated_contract_wrappers/exchange'; -import { constants } from './constants'; import { formatters } from './formatters'; import { LogDecoder } from './log_decoder'; import { orderUtils } from './order_utils'; @@ -192,20 +190,10 @@ export class ExchangeWrapper { return tx; } public async registerAssetProxyAsync( - assetProxyId: AssetProxyId, assetProxyAddress: string, from: string, - opts: { oldAssetProxyAddressIfExists?: string } = {}, ): Promise<TransactionReceiptWithDecodedLogs> { - const oldAssetProxyAddress = _.isUndefined(opts.oldAssetProxyAddressIfExists) - ? constants.NULL_ADDRESS - : opts.oldAssetProxyAddressIfExists; - const txHash = await this._exchange.registerAssetProxy.sendTransactionAsync( - assetProxyId, - assetProxyAddress, - oldAssetProxyAddress, - { from }, - ); + const txHash = await this._exchange.registerAssetProxy.sendTransactionAsync(assetProxyAddress, { from }); const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash); return tx; } |