From 5d05a2da7416d37da81d004d489c69d7326d9cce Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Mon, 9 Apr 2018 10:32:51 -0700 Subject: Revert variable naming --- packages/contracts/src/utils/exchange_wrapper.ts | 62 ++++++++++++------------ 1 file changed, 31 insertions(+), 31 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 743a9c496..cda012aa9 100644 --- a/packages/contracts/src/utils/exchange_wrapper.ts +++ b/packages/contracts/src/utils/exchange_wrapper.ts @@ -22,12 +22,12 @@ export class ExchangeWrapper { public async fillOrderAsync( signedOrder: SignedOrder, from: string, - opts: { takerSellAmount?: BigNumber } = {}, + opts: { takerTokenFillAmount?: BigNumber } = {}, ): Promise { - const params = orderUtils.createFill(signedOrder, opts.takerSellAmount); + const params = orderUtils.createFill(signedOrder, opts.takerTokenFillAmount); const txHash = await this._exchange.fillOrder.sendTransactionAsync( params.order, - params.takerSellAmount, + params.takerTokenFillAmount, params.signature, { from }, ); @@ -43,12 +43,12 @@ export class ExchangeWrapper { public async fillOrKillOrderAsync( signedOrder: SignedOrder, from: string, - opts: { takerSellAmount?: BigNumber } = {}, + opts: { takerTokenFillAmount?: BigNumber } = {}, ): Promise { - const params = orderUtils.createFill(signedOrder, opts.takerSellAmount); + const params = orderUtils.createFill(signedOrder, opts.takerTokenFillAmount); const txHash = await this._exchange.fillOrKillOrder.sendTransactionAsync( params.order, - params.takerSellAmount, + params.takerTokenFillAmount, params.signature, { from }, ); @@ -58,12 +58,12 @@ export class ExchangeWrapper { public async fillOrderNoThrowAsync( signedOrder: SignedOrder, from: string, - opts: { takerSellAmount?: BigNumber } = {}, + opts: { takerTokenFillAmount?: BigNumber } = {}, ): Promise { - const params = orderUtils.createFill(signedOrder, opts.takerSellAmount); + const params = orderUtils.createFill(signedOrder, opts.takerTokenFillAmount); const txHash = await this._exchange.fillOrderNoThrow.sendTransactionAsync( params.order, - params.takerSellAmount, + params.takerTokenFillAmount, params.signature, { from }, ); @@ -73,12 +73,12 @@ export class ExchangeWrapper { public async batchFillOrdersAsync( orders: SignedOrder[], from: string, - opts: { takerSellAmounts?: BigNumber[] } = {}, + opts: { takerTokenFillAmounts?: BigNumber[] } = {}, ): Promise { - const params = formatters.createBatchFill(orders, opts.takerSellAmounts); + const params = formatters.createBatchFill(orders, opts.takerTokenFillAmounts); const txHash = await this._exchange.batchFillOrders.sendTransactionAsync( params.orders, - params.takerSellAmounts, + params.takerTokenFillAmounts, params.signatures, { from }, ); @@ -88,12 +88,12 @@ export class ExchangeWrapper { public async batchFillOrKillOrdersAsync( orders: SignedOrder[], from: string, - opts: { takerSellAmounts?: BigNumber[] } = {}, + opts: { takerTokenFillAmounts?: BigNumber[] } = {}, ): Promise { - const params = formatters.createBatchFill(orders, opts.takerSellAmounts); + const params = formatters.createBatchFill(orders, opts.takerTokenFillAmounts); const txHash = await this._exchange.batchFillOrKillOrders.sendTransactionAsync( params.orders, - params.takerSellAmounts, + params.takerTokenFillAmounts, params.signatures, { from }, ); @@ -103,12 +103,12 @@ export class ExchangeWrapper { public async batchFillOrdersNoThrowAsync( orders: SignedOrder[], from: string, - opts: { takerSellAmounts?: BigNumber[] } = {}, + opts: { takerTokenFillAmounts?: BigNumber[] } = {}, ): Promise { - const params = formatters.createBatchFill(orders, opts.takerSellAmounts); + const params = formatters.createBatchFill(orders, opts.takerTokenFillAmounts); const txHash = await this._exchange.batchFillOrdersNoThrow.sendTransactionAsync( params.orders, - params.takerSellAmounts, + params.takerTokenFillAmounts, params.signatures, { from }, ); @@ -118,12 +118,12 @@ export class ExchangeWrapper { public async marketSellOrdersAsync( orders: SignedOrder[], from: string, - opts: { takerSellAmount: BigNumber }, + opts: { takerTokenFillAmount: BigNumber }, ): Promise { - const params = formatters.createMarketSellOrders(orders, opts.takerSellAmount); + const params = formatters.createMarketSellOrders(orders, opts.takerTokenFillAmount); const txHash = await this._exchange.marketSellOrders.sendTransactionAsync( params.orders, - params.takerSellAmount, + params.takerTokenFillAmount, params.signatures, { from }, ); @@ -133,12 +133,12 @@ export class ExchangeWrapper { public async marketSellOrdersNoThrowAsync( orders: SignedOrder[], from: string, - opts: { takerSellAmount: BigNumber }, + opts: { takerTokenFillAmount: BigNumber }, ): Promise { - const params = formatters.createMarketSellOrders(orders, opts.takerSellAmount); + const params = formatters.createMarketSellOrders(orders, opts.takerTokenFillAmount); const txHash = await this._exchange.marketSellOrdersNoThrow.sendTransactionAsync( params.orders, - params.takerSellAmount, + params.takerTokenFillAmount, params.signatures, { from }, ); @@ -148,12 +148,12 @@ export class ExchangeWrapper { public async marketBuyOrdersAsync( orders: SignedOrder[], from: string, - opts: { takerBuyAmount: BigNumber }, + opts: { makerTokenFillAmount: BigNumber }, ): Promise { - const params = formatters.createMarketBuyOrders(orders, opts.takerBuyAmount); + const params = formatters.createMarketBuyOrders(orders, opts.makerTokenFillAmount); const txHash = await this._exchange.marketBuyOrders.sendTransactionAsync( params.orders, - params.takerBuyAmount, + params.makerTokenFillAmount, params.signatures, { from }, ); @@ -163,12 +163,12 @@ export class ExchangeWrapper { public async marketBuyOrdersNoThrowAsync( orders: SignedOrder[], from: string, - opts: { takerBuyAmount: BigNumber }, + opts: { makerTokenFillAmount: BigNumber }, ): Promise { - const params = formatters.createMarketBuyOrders(orders, opts.takerBuyAmount); + const params = formatters.createMarketBuyOrders(orders, opts.makerTokenFillAmount); const txHash = await this._exchange.marketBuyOrdersNoThrow.sendTransactionAsync( params.orders, - params.takerBuyAmount, + params.makerTokenFillAmount, params.signatures, { from }, ); @@ -221,7 +221,7 @@ export class ExchangeWrapper { ); return partialAmount; } - public async getMakerAmountBoughtAsync(orderHashHex: string): Promise { + public async getTakerTokenFilledAmount(orderHashHex: string): Promise { const filledAmount = new BigNumber(await this._exchange.filled.callAsync(orderHashHex)); return filledAmount; } -- cgit v1.2.3