From d3aa881f55e8c83cc37f0e6820fed1ae173cd811 Mon Sep 17 00:00:00 2001 From: Archi Date: Fri, 23 Feb 2024 02:42:18 +0100 Subject: [PATCH] Fix STD serialization after STJ changes --- .../Data/SubmitRequest.cs | 18 +++++++++--------- .../SteamTokenDumperPlugin.cs | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Data/SubmitRequest.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Data/SubmitRequest.cs index 53aa1df13..5a721bfcf 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Data/SubmitRequest.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Data/SubmitRequest.cs @@ -30,17 +30,23 @@ using SteamKit2; namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper.Data; internal sealed class SubmitRequest { + private readonly ulong SteamID; + [JsonInclude] [JsonPropertyName("guid")] - private static string Guid => ASF.GlobalDatabase?.Identifier.ToString("N") ?? throw new InvalidOperationException(nameof(ASF.GlobalDatabase.Identifier)); + private string Guid => ASF.GlobalDatabase?.Identifier.ToString("N") ?? throw new InvalidOperationException(nameof(ASF.GlobalDatabase.Identifier)); + + [JsonInclude] + [JsonPropertyName("steamid")] + private string SteamIDText => new SteamID(SteamID).Render(); [JsonInclude] [JsonPropertyName("token")] - private static string Token => SharedInfo.Token; + private string Token => SharedInfo.Token; [JsonInclude] [JsonPropertyName("v")] - private static byte Version => SharedInfo.ApiVersion; + private byte Version => SharedInfo.ApiVersion; [JsonInclude] [JsonPropertyName("apps")] @@ -52,17 +58,11 @@ internal sealed class SubmitRequest { [JsonRequired] private ImmutableDictionary Depots { get; init; } - private readonly ulong SteamID; - [JsonInclude] [JsonPropertyName("subs")] [JsonRequired] private ImmutableDictionary Subs { get; init; } - [JsonInclude] - [JsonPropertyName("steamid")] - private string SteamIDText => new SteamID(SteamID).Render(); - internal SubmitRequest(ulong steamID, IReadOnlyCollection> apps, IReadOnlyCollection> accessTokens, IReadOnlyCollection> depots) { if ((steamID == 0) || !new SteamID(steamID).IsIndividualAccount) { throw new ArgumentOutOfRangeException(nameof(steamID)); diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs index 5718339c6..1d08cc939 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs @@ -53,7 +53,6 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper; internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotCommand2, IBotSteamClient, ISteamPICSChanges { private const ushort DepotsRateLimitingDelay = 500; - [JsonInclude] internal static SteamTokenDumperConfig? Config { get; private set; } private static readonly ConcurrentDictionary BotSubscriptions = new();