From 8e7937bdb61887ea3df66a602a275f5643e6585c Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Tue, 1 May 2018 19:06:17 +1000 Subject: Update comment to be more descriptive of null address in exchange simulator --- packages/0x.js/src/utils/exchange_transfer_simulator.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/0x.js/src/utils/exchange_transfer_simulator.ts') diff --git a/packages/0x.js/src/utils/exchange_transfer_simulator.ts b/packages/0x.js/src/utils/exchange_transfer_simulator.ts index ccefea930..f8301f5c2 100644 --- a/packages/0x.js/src/utils/exchange_transfer_simulator.ts +++ b/packages/0x.js/src/utils/exchange_transfer_simulator.ts @@ -67,7 +67,9 @@ export class ExchangeTransferSimulator { tradeSide: TradeSide, transferType: TransferType, ): Promise { - // If we are simulating an open order then 0x0 will have no balance or allowance + // HACK: When simulating an open order (e.g taker is NULL_ADDRESS), we don't want to adjust balances/ + // allowances for the taker. We do however, want to increase the balance of the maker since the maker + // might be relying on those funds to fill subsequent orders or pay the order's fees. if (from === constants.NULL_ADDRESS && tradeSide === TradeSide.Taker) { await this._increaseBalanceAsync(tokenAddress, to, amountInBaseUnits); return; -- cgit v1.2.3