Skip to content

Commit de5b795

Browse files
committed
🐛 fix ConfirmTrade
1 parent 4e698bc commit de5b795

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/WinAuth/WinAuth/SteamClient.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@ private class GenerateAccessTokenForAppResponseResponse
434434
[JsonProperty("access_token")]
435435
public string? AccessToken { get; set; }
436436
}
437-
438437
}
439438

440439
/// <summary>
@@ -792,7 +791,13 @@ public async Task<bool> ConfirmTrade(Dictionary<string, string> trades, bool acc
792791
// 现在可单条请求处理多个交易 循环以下代码添加批量的 cid 和 ck 即可
793792
// data.Add("cid[]", id);
794793
// data.Add("ck[]", key);
795-
string response = await RequestAsync<string>(COMMUNITY_BASE + "/mobileconf/multiajaxop", "POST", data);
794+
795+
NameValueCollection initHeaders = new()
796+
{
797+
{ "Origin", COMMUNITY_BASE },
798+
};
799+
800+
string response = await RequestAsync<string>(COMMUNITY_BASE + "/mobileconf/multiajaxop", "POST", data, headers: initHeaders);
796801

797802
if (string.IsNullOrEmpty(response) == true)
798803
{
@@ -1450,5 +1455,4 @@ static string CreateTimeHash(long time, string tag, string secret)
14501455
private static partial Regex GetSelfIconUrlFromConfirmationDetailsRegex();
14511456

14521457
#endregion GeneratedRegex
1453-
14541458
}

0 commit comments

Comments
 (0)