aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/exchange_transfer_simulator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-utils/src/exchange_transfer_simulator.ts')
-rw-r--r--packages/order-utils/src/exchange_transfer_simulator.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts
index 32d53d6a2..72ed85406 100644
--- a/packages/order-utils/src/exchange_transfer_simulator.ts
+++ b/packages/order-utils/src/exchange_transfer_simulator.ts
@@ -90,6 +90,9 @@ export class ExchangeTransferSimulator {
amountInBaseUnits: BigNumber,
): Promise<void> {
const proxyAllowance = await this._store.getProxyAllowanceAsync(assetData, userAddress);
+ // HACK: This code assumes that all tokens with an UNLIMITED_ALLOWANCE_IN_BASE_UNITS set,
+ // are UnlimitedAllowanceTokens. This is however not true, it just so happens that all
+ // DummyERC20Tokens we use in tests are.
if (!proxyAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)) {
this._store.setProxyAllowance(assetData, userAddress, proxyAllowance.minus(amountInBaseUnits));
}