diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/order_validation_utils.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/order_validation_utils.ts b/src/utils/order_validation_utils.ts index 6f7522c41..de20cf06d 100644 --- a/src/utils/order_validation_utils.ts +++ b/src/utils/order_validation_utils.ts @@ -121,7 +121,11 @@ export class OrderValidationUtils { } if (!isMakerTokenZRX) { - const makerZRXBalance = await this.tokenWrapper.getBalanceAsync(zrxTokenAddress, signedOrder.maker); + const isTakerTokenZRX = signedOrder.takerTokenAddress === zrxTokenAddress; + let makerZRXBalance = await this.tokenWrapper.getBalanceAsync(zrxTokenAddress, signedOrder.maker); + if (isTakerTokenZRX) { + makerZRXBalance = makerZRXBalance.plus(fillTakerAmount); + } const makerZRXAllowance = await this.tokenWrapper.getProxyAllowanceAsync( zrxTokenAddress, signedOrder.maker); |