@ex-master/core
Advanced tools
Comparing version 0.3.16 to 0.3.17
@@ -105,3 +105,3 @@ /// <reference types="node" /> | ||
existsMarket(market: Market): boolean; | ||
updateMarkets(): Promise<void>; | ||
updateMarkets(marketDataItems?: SpotMarketData[]): Promise<void>; | ||
destroy(): void; | ||
@@ -108,0 +108,0 @@ onInitialize(): Promise<void>; |
@@ -83,5 +83,7 @@ "use strict"; | ||
} | ||
updateMarkets() { | ||
updateMarkets(marketDataItems) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
let marketDataItems = yield this.getMarkets(); | ||
if (!marketDataItems || !marketDataItems.length) { | ||
marketDataItems = yield this.getMarkets(); | ||
} | ||
this.symbolToMarketDataMap = new Map(); | ||
@@ -88,0 +90,0 @@ let markets = []; |
{ | ||
"name": "@ex-master/core", | ||
"version": "0.3.16", | ||
"version": "0.3.17", | ||
"main": "bld/library/index.js", | ||
@@ -27,3 +27,3 @@ "types": "bld/library/index.d.ts", | ||
}, | ||
"gitHead": "d36139bb892d0bbc1853ec88e0137f7e52ee7028" | ||
"gitHead": "173b1bc1a3bbf1640ce3cc51624cc1182dd8e23f" | ||
} |
@@ -254,4 +254,6 @@ import {EventEmitter} from 'events'; | ||
async updateMarkets(): Promise<void> { | ||
let marketDataItems = await this.getMarkets(); | ||
async updateMarkets(marketDataItems?: SpotMarketData[]): Promise<void> { | ||
if (!marketDataItems || !marketDataItems.length) { | ||
marketDataItems = await this.getMarkets(); | ||
} | ||
@@ -258,0 +260,0 @@ this.symbolToMarketDataMap = new Map(); |
Sorry, the diff of this file is not supported yet
62939
1394