@pioneer-platform/markets 8.1.31 → 8.1.32

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.
Files changed (2) hide show
  1. package/lib/index.js +8 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -140,6 +140,7 @@ var build_balances = function (marketInfoCoinCap, marketInfoCoinGecko, pubkeys,
140
140
  hydratedPubkeys = [];
141
141
  for (i = 0; i < pubkeys.length; i++) {
142
142
  pubkey = pubkeys[i];
143
+ pubkey.context = context;
143
144
  if (!pubkey.balances) { // @ts-ignore
144
145
  pubkey.balances = [];
145
146
  }
@@ -195,11 +196,15 @@ var build_balances = function (marketInfoCoinCap, marketInfoCoinGecko, pubkeys,
195
196
  entry.valueUsd = String(valueUsd);
196
197
  //valueUsd
197
198
  totalValueUsd = Number(totalValueUsd) + Number(valueUsd);
198
- balance = JSON.parse(JSON.stringify(entry));
199
+ balance = JSON.parse(JSON.stringify(pubkey));
199
200
  delete balance.balances;
200
201
  balance = __assign(__assign({}, balance), entry);
201
- if (!balance.context)
202
- balance.context = entry.context;
202
+ log.info(tag, "context: at (init):", context);
203
+ log.info(tag, "pubkey: at (init):", pubkey);
204
+ log.info(tag, "balance: (init):", balance);
205
+ if (!balance.context) {
206
+ balance.context = context;
207
+ }
203
208
  if (coinInfoCoinCap) {
204
209
  balance.onCoinCap = true;
205
210
  if (balance.symbol && balance.symbol !== coinInfoCoinCap.symbol) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/markets",
3
- "version": "8.1.31",
3
+ "version": "8.1.32",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "dependencies": {