aboutsummaryrefslogtreecommitdiffstats
path: root/src/mempool/order_state_watcher.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-10 04:02:28 +0800
committerFabio Berger <me@fabioberger.com>2017-11-10 04:02:28 +0800
commit9ff42053c3f145ab6d5486d62325ed222363a8c5 (patch)
treef76517056ccbb94317389ee042662eb64bc229b8 /src/mempool/order_state_watcher.ts
parent5623400557232b974e11e786cf6bfa49128a04e2 (diff)
downloaddexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar
dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.gz
dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.bz2
dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.lz
dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.xz
dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.tar.zst
dexon-sol-tools-9ff42053c3f145ab6d5486d62325ed222363a8c5.zip
Add numConfirmations arg so that caller can decide on numConfirmations at which they want to watch orders
Diffstat (limited to 'src/mempool/order_state_watcher.ts')
-rw-r--r--src/mempool/order_state_watcher.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mempool/order_state_watcher.ts b/src/mempool/order_state_watcher.ts
index dc24d5b4a..05d77d15f 100644
--- a/src/mempool/order_state_watcher.ts
+++ b/src/mempool/order_state_watcher.ts
@@ -64,9 +64,10 @@ export class OrderStateWatcher {
// We currently do not remove the maker/makerToken keys from the mapping when all orderHashes removed
}
public subscribe(callback: OnOrderStateChangeCallback): void {
+ public subscribe(callback: OnOrderStateChangeCallback, numConfirmations: number): void {
assert.isFunction('callback', callback);
this._callbackAsync = callback;
- this._eventWatcher.subscribe(this._onMempoolEventCallbackAsync.bind(this));
+ this._eventWatcher.subscribe(this._onMempoolEventCallbackAsync.bind(this), numConfirmations);
}
public unsubscribe(): void {
delete this._callbackAsync;