diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-21 21:51:24 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-21 22:30:04 +0800 |
commit | 1dda8c146816a6b7fe1ab17a437a4349dece674c (patch) | |
tree | 33b95a07fb78332a065dd5b55fbd72aeb7f5e8dc /packages/0x.js/src | |
parent | 7d9c357409c25996f9c448dffd69007f69b9d8d6 (diff) | |
download | dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.tar dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.tar.gz dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.tar.bz2 dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.tar.lz dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.tar.xz dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.tar.zst dexon-sol-tools-1dda8c146816a6b7fe1ab17a437a4349dece674c.zip |
Fix a bug causing fillOrdersUpTo validation to fail because of some extra orders being passed
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r-- | packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 3 |
1 files changed, 3 insertions, 0 deletions
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; + } } } |