steamutils 1.2.69 → 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 +21 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -26,6 +26,7 @@ export const MatchHistoryType = {
26
26
  matchhistoryscrimmage: 'matchhistoryscrimmage',
27
27
  matchhistorycompetitive: 'matchhistorycompetitive',
28
28
  matchhistorypremier: 'matchhistorypremier',
29
+ matchhistorycompetitivepermap: 'matchhistorycompetitivepermap',
29
30
  }
30
31
 
31
32
  export const MatchWinLose = {
@@ -5445,6 +5446,7 @@ class SteamUser {
5445
5446
  }
5446
5447
 
5447
5448
  async getInventoryHistory(cursor) {
5449
+ const steamId = this.getSteamidUser()
5448
5450
  if (!cursor) {
5449
5451
  cursor = {
5450
5452
  time: parseInt(new Date().getTime() / 1000),
@@ -5605,6 +5607,7 @@ class SteamUser {
5605
5607
  classid,
5606
5608
  instanceid,
5607
5609
  contextid,
5610
+ steamId,
5608
5611
  plusminus: items_plusminus
5609
5612
  })
5610
5613
  }
@@ -5615,19 +5618,24 @@ class SteamUser {
5615
5618
  })
5616
5619
  })
5617
5620
 
5618
- const id = [timestamp, description, plusminus, tradehistory_items.map(item => (item.classid || '0') + "_" + (item.instanceid || '0')).join('|')]
5619
- .map(item => item.toString().replaceAll(/[^a-zA-Z0-9-+_|]/gi, ''))
5620
- .join('_').toLowerCase()
5621
-
5622
- tradehistory.push({
5623
- id,
5624
- timestamp,
5625
- timestampStr,
5626
- description,
5627
- plusminus,
5628
- tradehistory_items,
5629
- ...(!!tradePeople && {tradePeople})
5630
- })
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
+ }
5631
5639
  })
5632
5640
 
5633
5641
  return {cursor: result.cursor, tradehistory}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.69",
3
+ "version": "1.2.71",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",