diff options
author | Jacob Evans <dekz@dekz.net> | 2018-08-16 10:13:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-16 10:13:27 +0800 |
commit | 480d28ea26be86d685d81059a0dbe4cd025f0c21 (patch) | |
tree | 8b8b72f1945a7d85f11af14f16338a059cc9f900 /packages/contracts/test/exchange | |
parent | f9f232f5d9527926cd64027f69491b0bc6e58894 (diff) | |
parent | 88c99396a2d1b880bffb21ef19507d02b474ba9b (diff) | |
download | dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.tar dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.tar.gz dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.tar.bz2 dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.tar.lz dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.tar.xz dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.tar.zst dexon-sol-tools-480d28ea26be86d685d81059a0dbe4cd025f0c21.zip |
Merge pull request #959 from 0xProject/bug/order-utils/rounding-error-small-maker
[Order-utils] Order is valid when maker amount is very small
Diffstat (limited to 'packages/contracts/test/exchange')
-rw-r--r-- | packages/contracts/test/exchange/fill_order.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/contracts/test/exchange/fill_order.ts b/packages/contracts/test/exchange/fill_order.ts index 1494fe093..e79e2239e 100644 --- a/packages/contracts/test/exchange/fill_order.ts +++ b/packages/contracts/test/exchange/fill_order.ts @@ -104,6 +104,17 @@ describe('FillOrder Tests', () => { }; await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); }); + it('should transfer the correct amounts when makerAssetAmount < takerAssetAmount with zero decimals', async () => { + const fillScenario = { + ...defaultFillScenario, + orderScenario: { + ...defaultFillScenario.orderScenario, + makerAssetAmountScenario: OrderAssetAmountScenario.Small, + makerAssetDataScenario: AssetDataScenario.ERC20ZeroDecimals, + }, + }; + await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario); + }); it('should transfer the correct amounts when taker is specified and order is claimed by taker', async () => { const fillScenario = { ...defaultFillScenario, |