mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
@@ -1752,6 +1752,17 @@ namespace ArchiSteamFarm {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasTradeToken = !string.IsNullOrEmpty(tradeToken);
|
||||||
|
|
||||||
|
Dictionary<string, object> arguments = new Dictionary<string, object>(hasTradeToken ? 3 : 2) {
|
||||||
|
{ "key", steamApiKey },
|
||||||
|
{ "steamid_target", steamID }
|
||||||
|
};
|
||||||
|
|
||||||
|
if (hasTradeToken) {
|
||||||
|
arguments["trade_offer_access_token"] = tradeToken;
|
||||||
|
}
|
||||||
|
|
||||||
KeyValue response = null;
|
KeyValue response = null;
|
||||||
|
|
||||||
for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) {
|
for (byte i = 0; (i < WebBrowser.MaxTries) && (response == null); i++) {
|
||||||
@@ -1763,11 +1774,7 @@ namespace ArchiSteamFarm {
|
|||||||
WebAPI.DefaultBaseAddress.Host,
|
WebAPI.DefaultBaseAddress.Host,
|
||||||
|
|
||||||
// ReSharper disable once AccessToDisposedClosure
|
// ReSharper disable once AccessToDisposedClosure
|
||||||
async () => await iEconService.GetTradeHoldDurations(
|
async () => await iEconService.GetTradeHoldDurations(arguments)
|
||||||
key: steamApiKey,
|
|
||||||
steamid_target: steamID,
|
|
||||||
trade_offer_access_token: tradeToken ?? "" // TODO: Change me once https://github.com/SteamRE/SteamKit/pull/522 is merged
|
|
||||||
)
|
|
||||||
).ConfigureAwait(false);
|
).ConfigureAwait(false);
|
||||||
} catch (TaskCanceledException e) {
|
} catch (TaskCanceledException e) {
|
||||||
Bot.ArchiLogger.LogGenericDebuggingException(e);
|
Bot.ArchiLogger.LogGenericDebuggingException(e);
|
||||||
@@ -1916,9 +1923,9 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
// ReSharper disable once AccessToDisposedClosure
|
// ReSharper disable once AccessToDisposedClosure
|
||||||
async () => await iSteamUserAuth.AuthenticateUser(
|
async () => await iSteamUserAuth.AuthenticateUser(
|
||||||
encrypted_loginkey: Encoding.ASCII.GetString(WebUtility.UrlEncodeToBytes(encryptedLoginKey, 0, encryptedLoginKey.Length)),
|
encrypted_loginkey: encryptedLoginKey,
|
||||||
method: WebRequestMethods.Http.Post,
|
method: WebRequestMethods.Http.Post,
|
||||||
sessionkey: Encoding.ASCII.GetString(WebUtility.UrlEncodeToBytes(encryptedSessionKey, 0, encryptedSessionKey.Length)),
|
sessionkey: encryptedSessionKey,
|
||||||
steamid: steamID
|
steamid: steamID
|
||||||
)
|
)
|
||||||
).ConfigureAwait(false);
|
).ConfigureAwait(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user