@icgio/icg-exchanges-wrapper 1.9.174 → 1.9.175

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1217,10 +1217,10 @@ module.exports = class Orders {
1217
1217
  }
1218
1218
  }
1219
1219
  }
1220
- let rates_handler = (exchange, pair, res) => {
1220
+ let rates_handler = (exchange, pair, res, rates_with_routes = false) => {
1221
1221
  if (res.success) {
1222
1222
  let { asks, bids } = res.body
1223
- if (this.Exchanges[exchange].exchange_type === 'dex') {
1223
+ if (rates_with_routes) {
1224
1224
  _.set(this.rates_with_routes, [exchange, pair], { asks, bids, update_time: new Date() })
1225
1225
  asks = asks.map((ask) => ask.slice(0, 2))
1226
1226
  bids = bids.map((bid) => bid.slice(0, 2))
@@ -1262,7 +1262,7 @@ module.exports = class Orders {
1262
1262
  for (let pair of exchange_pairs[exchange]) {
1263
1263
  setInterval(() => {
1264
1264
  Exchanges[exchange].rate_with_routes(pair, (res) => {
1265
- rates_handler(exchange, pair, res)
1265
+ rates_handler(exchange, pair, res, (rates_with_routes = true))
1266
1266
  })
1267
1267
  }, interval_dict[exchange].rates)
1268
1268
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.9.174",
3
+ "version": "1.9.175",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {