aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index eace55f4d..e2ac07b55 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -141,6 +141,9 @@ export class ExchangeWrapper extends ContractWrapper {
if (fillAmount.greaterThan(takerBalance)) {
throw new Error(FillOrderValidationErrs.NOT_ENOUGH_TAKER_BALANCE);
}
+ if (fillAmount.greaterThan(takerAllowance)) {
+ throw new Error(FillOrderValidationErrs.NOT_ENOUGH_TAKER_ALLOWANCE);
+ }
}
private throwErrorLogsAsErrors(logs: ContractEvent[]): void {
const errEvent = _.find(logs, {event: 'LogError'});