From 1dda8c146816a6b7fe1ab17a437a4349dece674c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 21 Mar 2018 14:51:24 +0100 Subject: Fix a bug causing fillOrdersUpTo validation to fail because of some extra orders being passed --- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/0x.js/src/contract_wrappers') diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 6414985e6..124750d81 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -281,6 +281,9 @@ export class ExchangeWrapper extends ContractWrapper { zrxTokenAddress, ); filledTakerTokenAmount = filledTakerTokenAmount.plus(singleFilledTakerTokenAmount); + if (filledTakerTokenAmount.eq(fillTakerTokenAmount)) { + break; + } } } -- cgit