aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2017-11-13 00:28:01 +0800
committerJacob Evans <jacob@dekz.net>2017-11-13 00:28:01 +0800
commit3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd (patch)
tree37f4c3dc2344607737e5da3d79ed5cf0c3bb5ffd /test
parentabb23631df4fd775d2f9c96332e16c0732b2955e (diff)
downloaddexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.tar
dexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.tar.gz
dexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.tar.bz2
dexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.tar.lz
dexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.tar.xz
dexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.tar.zst
dexon-sol-tools-3e2a614eb9a4f1219e2f11ea29c8a7cd59dd74dd.zip
Calculate the remaining order amount in maker units
Diffstat (limited to 'test')
-rw-r--r--test/order_state_watcher_test.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/order_state_watcher_test.ts b/test/order_state_watcher_test.ts
index 3421353e3..039bcef18 100644
--- a/test/order_state_watcher_test.ts
+++ b/test/order_state_watcher_test.ts
@@ -189,6 +189,8 @@ describe('OrderStateWatcher', () => {
expect(validOrderState.orderHash).to.be.equal(orderHash);
const orderRelevantState = validOrderState.orderRelevantState;
const remainingMakerBalance = makerBalance.sub(fillAmountInBaseUnits);
+ const remainingFillable = fillableAmount.minus(fillAmountInBaseUnits);
+ expect(remainingFillable).to.be.bignumber.equal(fillableAmount.minus(fillAmountInBaseUnits));
expect(orderRelevantState.makerBalance).to.be.bignumber.equal(remainingMakerBalance);
if (eventCount === 2) {
done();