steamutils 1.1.32 → 1.1.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +8 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -523,11 +523,15 @@ function CookieManager(cookie) {
523
523
  }
524
524
 
525
525
  function setCookie(name, value) {
526
+ removeCookie(name)
527
+ _CookieObj[name] = value
528
+ }
529
+
530
+ function removeCookie(name) {
526
531
  const existedKey = Object.keys(_CookieObj).find(k => k.toLowerCase() === name.toLowerCase())
527
532
  if (existedKey) {
528
533
  delete _CookieObj[existedKey]
529
534
  }
530
- _CookieObj[name] = value
531
535
  }
532
536
 
533
537
  function setCookies(cookies) {
@@ -553,6 +557,7 @@ function CookieManager(cookie) {
553
557
 
554
558
  return {
555
559
  setCookie,
560
+ removeCookie,
556
561
  setCookies,
557
562
  getCookie,
558
563
  toString,
@@ -576,6 +581,7 @@ class SteamUser {
576
581
 
577
582
  constructor (cookies) {
578
583
  this._cookies = new CookieManager(cookies)
584
+ this._cookies.removeCookie('timezoneOffset')
579
585
 
580
586
  let {
581
587
  steamMachineAuth,
@@ -5046,8 +5052,7 @@ class SteamUser {
5046
5052
 
5047
5053
  let timestamp = 0
5048
5054
  let timestampStr = `${tradehistory_date} ${tradehistory_timestamp}`
5049
- //cccccccccccccccccc
5050
- const timestampMoment = moment(`${tradehistory_date} ${tradehistory_timestamp}`, `D MMM, YYYY h:mma`, true).local(true)
5055
+ const timestampMoment = moment(`${tradehistory_date} ${tradehistory_timestamp}`, `D MMM, YYYY h:mma`, true)
5051
5056
  if (!timestampMoment.isValid()) {
5052
5057
  console.log(`${tradehistory_date} ${tradehistory_timestamp}`);
5053
5058
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.1.32",
3
+ "version": "1.1.34",
4
4
  "main":"index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",