aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/order_filled_cancelled_lazy_store.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-13 02:06:25 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-13 09:06:13 +0800
commita9ae555b88cc36ff2cbd92fdd37a339702860c01 (patch)
treed42ed590c81683a3f6acd0882d31392a9a97f1ca /src/stores/order_filled_cancelled_lazy_store.ts
parentd4dc428124a210cc6b8e1c50527a08e902bfadd0 (diff)
downloaddexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.tar
dexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.tar.gz
dexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.tar.bz2
dexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.tar.lz
dexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.tar.xz
dexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.tar.zst
dexon-sol-tools-a9ae555b88cc36ff2cbd92fdd37a339702860c01.zip
Store number of confirmations in a blockStore
Diffstat (limited to 'src/stores/order_filled_cancelled_lazy_store.ts')
-rw-r--r--src/stores/order_filled_cancelled_lazy_store.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/stores/order_filled_cancelled_lazy_store.ts b/src/stores/order_filled_cancelled_lazy_store.ts
index 5b0dab35c..104a8240e 100644
--- a/src/stores/order_filled_cancelled_lazy_store.ts
+++ b/src/stores/order_filled_cancelled_lazy_store.ts
@@ -9,7 +9,6 @@ import {BlockStore} from './block_store';
*/
export class OrderFilledCancelledLazyStore {
private exchange: ExchangeWrapper;
- private numConfirmations: number;
private blockStore: BlockStore;
private filledTakerAmount: {
[orderHash: string]: BigNumber,
@@ -17,16 +16,15 @@ export class OrderFilledCancelledLazyStore {
private cancelledTakerAmount: {
[orderHash: string]: BigNumber,
};
- constructor(exchange: ExchangeWrapper, blockStore: BlockStore, numConfirmations: number) {
+ constructor(exchange: ExchangeWrapper, blockStore: BlockStore) {
this.exchange = exchange;
- this.numConfirmations = numConfirmations;
this.blockStore = blockStore;
this.filledTakerAmount = {};
this.cancelledTakerAmount = {};
}
public async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
if (_.isUndefined(this.filledTakerAmount[orderHash])) {
- const defaultBlock = this.blockStore.getBlockNumberWithNConfirmations(this.numConfirmations);
+ const defaultBlock = this.blockStore.getBlockNumber();
const methodOpts = {
defaultBlock,
};
@@ -44,7 +42,7 @@ export class OrderFilledCancelledLazyStore {
}
public async getCancelledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
if (_.isUndefined(this.cancelledTakerAmount[orderHash])) {
- const defaultBlock = this.blockStore.getBlockNumberWithNConfirmations(this.numConfirmations);
+ const defaultBlock = this.blockStore.getBlockNumber();
const methodOpts = {
defaultBlock,
};