steamutils 1.2.32 → 1.2.33
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.
- package/index.js +10 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -5885,14 +5885,17 @@ class SteamUser {
|
|
5885
5885
|
}
|
5886
5886
|
|
5887
5887
|
static parseTradeURL(tradeURL){
|
5888
|
-
|
5889
|
-
|
5890
|
-
|
5888
|
+
try {
|
5889
|
+
const tradeURLParams = url.parse(tradeURL).query.split('&').reduce((accumulator, currentValue, index) => ({
|
5890
|
+
...accumulator, [currentValue.split('=')[0]]: currentValue.split('=')[1]
|
5891
|
+
}), {})
|
5891
5892
|
|
5892
|
-
|
5893
|
-
|
5894
|
-
|
5895
|
-
|
5893
|
+
return {
|
5894
|
+
accountId: tradeURLParams.partner,
|
5895
|
+
steamId: SteamID.fromIndividualAccountID(tradeURLParams.partner).getSteamID64(),
|
5896
|
+
token: tradeURLParams.token,
|
5897
|
+
}
|
5898
|
+
} catch (e) {
|
5896
5899
|
}
|
5897
5900
|
}
|
5898
5901
|
|