steamutils 1.2.70 → 1.2.71

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/index.js +20 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5446,6 +5446,7 @@ class SteamUser {
5446
5446
  }
5447
5447
 
5448
5448
  async getInventoryHistory(cursor) {
5449
+ const steamId = this.getSteamidUser()
5449
5450
  if (!cursor) {
5450
5451
  cursor = {
5451
5452
  time: parseInt(new Date().getTime() / 1000),
@@ -5606,6 +5607,7 @@ class SteamUser {
5606
5607
  classid,
5607
5608
  instanceid,
5608
5609
  contextid,
5610
+ steamId,
5609
5611
  plusminus: items_plusminus
5610
5612
  })
5611
5613
  }
@@ -5616,19 +5618,24 @@ class SteamUser {
5616
5618
  })
5617
5619
  })
5618
5620
 
5619
- const id = [timestamp, description, plusminus, tradehistory_items.map(item => (item.classid || '0') + "_" + (item.instanceid || '0')).join('|')]
5620
- .map(item => item.toString().replaceAll(/[^a-zA-Z0-9-+_|]/gi, ''))
5621
- .join('_').toLowerCase()
5622
-
5623
- tradehistory.push({
5624
- id,
5625
- timestamp,
5626
- timestampStr,
5627
- description,
5628
- plusminus,
5629
- tradehistory_items,
5630
- ...(!!tradePeople && {tradePeople})
5631
- })
5621
+ if(tradehistory_items.length){
5622
+ const id = [timestamp, description, plusminus, tradehistory_items.map(item => (item.classid || '0') + "_" + (item.instanceid || '0')).join('|')]
5623
+ .map(item => item.toString().replaceAll(/[^a-zA-Z0-9-+_|]/gi, ''))
5624
+ .join('_').toLowerCase()
5625
+
5626
+ tradehistory.push({
5627
+ id,
5628
+ timestamp,
5629
+ timestampStr,
5630
+ description,
5631
+ plusminus,
5632
+ tradehistory_items,
5633
+ steamId,
5634
+ ...(!!tradePeople && {tradePeople})
5635
+ })
5636
+ } else {
5637
+ console.error("tradehistory_items empty", steamId);
5638
+ }
5632
5639
  })
5633
5640
 
5634
5641
  return {cursor: result.cursor, tradehistory}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.70",
3
+ "version": "1.2.71",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",