Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Commit

Permalink
PATCH v3.1.7 (Added another JSON Reader Exception falloff)
Browse files Browse the repository at this point in the history
  • Loading branch information
weedeej committed Mar 8, 2022
1 parent c2c260b commit e08ad71
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ValorantCC/ValorantCC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AssemblyVersion></AssemblyVersion>
<FileVersion></FileVersion>
<Version>3.1.6</Version>
<Version>3.1.7</Version>
<SignAssembly>true</SignAssembly>
</PropertyGroup>

Expand Down
13 changes: 10 additions & 3 deletions ValorantCC/src/Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,20 @@ private async Task<AuthTokens> ObtainAuthTokens()

private async static Task<String> GetVersion()
{
string ver = "release-04.04-shipping-15-678808";
Utilities.Utils.Log("Obtaining Client Version info");
RestRequest request = new RestRequest("https://vtools-next.vercel.app/api/skinslist/version", Method.Get);

RestResponse response = await client.ExecuteAsync(request);
if (!response.IsSuccessful) return "release-04.04-shipping-15-678808";

VersionResponse RespData = JsonConvert.DeserializeObject<VersionResponse>(response.Content.ToString());
if (!response.IsSuccessful) return ver;
VersionResponse RespData;
try
{
RespData = JsonConvert.DeserializeObject<VersionResponse>(response.Content.ToString());
} catch (JsonReaderException)
{
return ver;
}
RespData.Status = ((int)response.StatusCode);
return RespData.riotClientVersion;
}
Expand Down

0 comments on commit e08ad71

Please sign in to comment.