steamutils 1.2.32 → 1.2.33
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
|