From d4852092b84936a7c2db207899321ad2a1955e64 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Fri, 29 Jun 2018 14:34:46 -0700 Subject: Make registerAssetProxy append only --- packages/contracts/src/utils/exchange_wrapper.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'packages/contracts/src/utils/exchange_wrapper.ts') 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 { - 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; } -- cgit v1.2.3