@icgio/icg-exchanges-wrapper 1.12.60 → 1.12.62

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.
@@ -87,6 +87,7 @@ module.exports = class Orders {
87
87
  this.account_init = false
88
88
  this.cmc_curs = settings.cmc_curs || []
89
89
  this.cmc_source = settings.cmc_source || 'coingecko'
90
+ this.accounting_benchmark = settings.accounting_benchmark
90
91
  this.balance_benchmark = settings.balance_benchmark || {}
91
92
  this.min_reserve_balance = settings.min_reserve_balance || {}
92
93
  for (let exchange in exchange_pairs) {
@@ -740,7 +741,7 @@ module.exports = class Orders {
740
741
  }
741
742
  if (!this.account_init && _.keys(this.balances).length === _.keys(this.exchange_pairs).length) {
742
743
  this.account_init = true
743
- this.init_account(this.balances, this.balance_benchmark)
744
+ this.init_account(this.balances, this.accounting_benchmark || this.balance_benchmark) // use accounting_benchmark if it exists
744
745
  }
745
746
  } else if (_.get(this.balances, [exchange, 'update_time']) < new Date().getTime() - this.interval_dict[exchange].balances) {
746
747
  this.info_log('%s balances expired: %j', exchange, res)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.12.60",
3
+ "version": "1.12.62",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,12 +17,12 @@
17
17
  },
18
18
  "homepage": "https://github.com/icgio/icg-exchanges-wrapper#readme",
19
19
  "dependencies": {
20
- "@icgio/icg-exchanges": "^1.30.49",
20
+ "@icgio/icg-exchanges": "^1.30.50",
21
21
  "@icgio/icg-exchanges-data": "^1.8.47",
22
22
  "@icgio/icg-utils": "^1.7.65",
23
23
  "influx": "^5.7.0",
24
24
  "lodash": "^4.17.20",
25
25
  "uuid": "^9.0.1",
26
- "ws": "^8.15.0"
26
+ "ws": "^8.15.1"
27
27
  }
28
28
  }