From b5bcfc8fe7680b094091823483d2416a73da9be9 Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Fri, 18 May 2018 16:38:01 -0700 Subject: orderFilledAmount -> orderTakerAssetFilledAmount --- .../contracts/test/utils/match_order_tester.ts | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'packages/contracts/test/utils/match_order_tester.ts') diff --git a/packages/contracts/test/utils/match_order_tester.ts b/packages/contracts/test/utils/match_order_tester.ts index f95d8fb34..14930de08 100644 --- a/packages/contracts/test/utils/match_order_tester.ts +++ b/packages/contracts/test/utils/match_order_tester.ts @@ -119,21 +119,21 @@ export class MatchOrderTester { const feeRecipientAddressLeft = signedOrderLeft.feeRecipientAddress; const feeRecipientAddressRight = signedOrderRight.feeRecipientAddress; // Verify Left order preconditions - const orderFilledAmountLeft = await this._exchangeWrapper.getTakerAssetFilledAmountAsync( + const orderTakerAssetFilledAmountLeft = await this._exchangeWrapper.getTakerAssetFilledAmountAsync( orderUtils.getOrderHashHex(signedOrderLeft), ); const expectedOrderFilledAmountLeft = initialTakerAssetFilledAmountLeft ? initialTakerAssetFilledAmountLeft : new BigNumber(0); - expect(expectedOrderFilledAmountLeft).to.be.bignumber.equal(orderFilledAmountLeft); + expect(expectedOrderFilledAmountLeft).to.be.bignumber.equal(orderTakerAssetFilledAmountLeft); // Verify Right order preconditions - const orderFilledAmountRight = await this._exchangeWrapper.getTakerAssetFilledAmountAsync( + const orderTakerAssetFilledAmountRight = await this._exchangeWrapper.getTakerAssetFilledAmountAsync( orderUtils.getOrderHashHex(signedOrderRight), ); const expectedOrderFilledAmountRight = initialTakerAssetFilledAmountRight ? initialTakerAssetFilledAmountRight : new BigNumber(0); - expect(expectedOrderFilledAmountRight).to.be.bignumber.equal(orderFilledAmountRight); + expect(expectedOrderFilledAmountRight).to.be.bignumber.equal(orderTakerAssetFilledAmountRight); // Match left & right orders await this._exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress); const newERC20BalancesByOwner = await this._erc20Wrapper.getBalancesAsync(); @@ -142,8 +142,8 @@ export class MatchOrderTester { const expectedTransferAmounts = await this._calculateExpectedTransferAmountsAsync( signedOrderLeft, signedOrderRight, - orderFilledAmountLeft, - orderFilledAmountRight, + orderTakerAssetFilledAmountLeft, + orderTakerAssetFilledAmountRight, ); let expectedERC20BalancesByOwner: ERC20BalancesByOwner; let expectedERC721TokenIdsByOwner: ERC721TokenIdsByOwner; @@ -169,19 +169,19 @@ export class MatchOrderTester { /// the taker when two orders are matched. /// @param signedOrderLeft First matched order. /// @param signedOrderRight Second matched order. - /// @param orderFilledAmountLeft How much left order has been filled, prior to matching orders. - /// @param orderFilledAmountRight How much the right order has been filled, prior to matching orders. + /// @param orderTakerAssetFilledAmountLeft How much left order has been filled, prior to matching orders. + /// @param orderTakerAssetFilledAmountRight How much the right order has been filled, prior to matching orders. /// @return TransferAmounts A struct containing the expected transfer amounts. private async _calculateExpectedTransferAmountsAsync( signedOrderLeft: SignedOrder, signedOrderRight: SignedOrder, - orderFilledAmountLeft: BigNumber, - orderFilledAmountRight: BigNumber, + orderTakerAssetFilledAmountLeft: BigNumber, + orderTakerAssetFilledAmountRight: BigNumber, ): Promise { let amountBoughtByLeftMaker = await this._exchangeWrapper.getTakerAssetFilledAmountAsync( orderUtils.getOrderHashHex(signedOrderLeft), ); - amountBoughtByLeftMaker = amountBoughtByLeftMaker.minus(orderFilledAmountLeft); + amountBoughtByLeftMaker = amountBoughtByLeftMaker.minus(orderTakerAssetFilledAmountLeft); const amountSoldByLeftMaker = amountBoughtByLeftMaker .times(signedOrderLeft.makerAssetAmount) .dividedToIntegerBy(signedOrderLeft.takerAssetAmount); @@ -192,7 +192,7 @@ export class MatchOrderTester { let amountBoughtByRightMaker = await this._exchangeWrapper.getTakerAssetFilledAmountAsync( orderUtils.getOrderHashHex(signedOrderRight), ); - amountBoughtByRightMaker = amountBoughtByRightMaker.minus(orderFilledAmountRight); + amountBoughtByRightMaker = amountBoughtByRightMaker.minus(orderTakerAssetFilledAmountRight); const amountSoldByRightMaker = amountBoughtByRightMaker .times(signedOrderRight.makerAssetAmount) .dividedToIntegerBy(signedOrderRight.takerAssetAmount); -- cgit v1.2.3