aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2019-01-08 03:11:19 +0800
committerAmir Bandeali <abandeali1@gmail.com>2019-01-08 03:11:19 +0800
commitfd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4 (patch)
tree094420dc85ebaa83cc5e44ab7805f278418c953e /packages/order-watcher
parent24564b986daa703f66e54f85abf4782d99a40f94 (diff)
downloaddexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.tar
dexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.tar.gz
dexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.tar.bz2
dexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.tar.lz
dexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.tar.xz
dexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.tar.zst
dexon-sol-tools-fd37e88bdbdcc821e4aa734aed6ad1f499b2b3e4.zip
Use enums in pipeline
Diffstat (limited to 'packages/order-watcher')
-rw-r--r--packages/order-watcher/CHANGELOG.json2
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts2
-rw-r--r--packages/order-watcher/test/order_watcher_test.ts42
3 files changed, 23 insertions, 23 deletions
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
index b4807dc89..4cfecd034 100644
--- a/packages/order-watcher/CHANGELOG.json
+++ b/packages/order-watcher/CHANGELOG.json
@@ -3,7 +3,7 @@
"version": "2.4.0",
"changes": [
{
- "note": "Add support for MultiAssetProxy",
+ "note": "Add support for `MultiAssetProxy`",
"pr": 1363
}
]
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 656f21a53..a06fd0cfe 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -487,4 +487,4 @@ export class OrderWatcher {
this._callbackIfExists(null, orderState);
}
}
-} // tslint:disable:max-file-line-count
+}
diff --git a/packages/order-watcher/test/order_watcher_test.ts b/packages/order-watcher/test/order_watcher_test.ts
index dfa36f2fd..41dc884d5 100644
--- a/packages/order-watcher/test/order_watcher_test.ts
+++ b/packages/order-watcher/test/order_watcher_test.ts
@@ -859,29 +859,29 @@ describe('OrderWatcher', () => {
})().catch(done);
});
// TODO(abandeali1): The following test will fail until the MAP has been deployed and activated.
- // it('should emit orderStateInvalid when watched order fully filled', (done: DoneCallback) => {
- // (async () => {
- // signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- // makerMultiAssetData,
- // takerAssetData,
- // makerAddress,
- // takerAddress,
- // fillableAmount,
- // );
- // const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- // await orderWatcher.addOrderAsync(signedOrder);
+ it.skip('should emit orderStateInvalid when watched order fully filled', (done: DoneCallback) => {
+ (async () => {
+ signedOrder = await fillScenarios.createFillableSignedOrderAsync(
+ makerMultiAssetData,
+ takerAssetData,
+ makerAddress,
+ takerAddress,
+ fillableAmount,
+ );
+ const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
+ await orderWatcher.addOrderAsync(signedOrder);
- // const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- // expect(orderState.isValid).to.be.false();
- // const invalidOrderState = orderState as OrderStateInvalid;
- // expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- // expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.OrderRemainingFillAmountZero);
- // });
- // orderWatcher.subscribe(callback);
+ const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
+ expect(orderState.isValid).to.be.false();
+ const invalidOrderState = orderState as OrderStateInvalid;
+ expect(invalidOrderState.orderHash).to.be.equal(orderHash);
+ expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.OrderRemainingFillAmountZero);
+ });
+ orderWatcher.subscribe(callback);
- // await contractWrappers.exchange.fillOrderAsync(signedOrder, fillableAmount, takerAddress);
- // })().catch(done);
- // });
+ await contractWrappers.exchange.fillOrderAsync(signedOrder, fillableAmount, takerAddress);
+ })().catch(done);
+ });
});
});
}); // tslint:disable:max-file-line-count