From f56853030ef4309202890c249645cd021211763a Mon Sep 17 00:00:00 2001 From: JKorf Date: Mon, 16 Mar 2026 21:36:59 +0100 Subject: [PATCH] wip --- .../SystemTextJsonConverterTests.cs | 2 +- .../Authentication/ApiCredentials.cs | 57 ------------------- 2 files changed, 1 insertion(+), 58 deletions(-) diff --git a/CryptoExchange.Net.UnitTests/SystemTextJsonConverterTests.cs b/CryptoExchange.Net.UnitTests/SystemTextJsonConverterTests.cs index dd5fa97..4eec97f 100644 --- a/CryptoExchange.Net.UnitTests/SystemTextJsonConverterTests.cs +++ b/CryptoExchange.Net.UnitTests/SystemTextJsonConverterTests.cs @@ -339,7 +339,7 @@ namespace CryptoExchange.Net.UnitTests public class STJDecimalObject { - [JsonConverter(typeof(NullableDecimalConverter))] + [JsonConverter(typeof(DecimalConverter))] [JsonPropertyName("test")] public decimal? Test { get; set; } } diff --git a/CryptoExchange.Net/Authentication/ApiCredentials.cs b/CryptoExchange.Net/Authentication/ApiCredentials.cs index f1c4adc..5476462 100644 --- a/CryptoExchange.Net/Authentication/ApiCredentials.cs +++ b/CryptoExchange.Net/Authentication/ApiCredentials.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; -using System.IO; using System.Linq; -using System.Threading.Tasks; namespace CryptoExchange.Net.Authentication { @@ -140,61 +138,6 @@ namespace CryptoExchange.Net.Authentication return CredentialPairs.OfType().SingleOrDefault(); } - ///// - ///// Create API credentials using an API key and secret generated by the server - ///// - //public static ApiCredentials HmacCredentials(string apiKey, string apiSecret, string? pass = null) - //{ - // return new ApiCredentials(new HMACCredential(apiKey, apiSecret, pass)); - //} - - //#if NETSTANDARD2_1_OR_GREATER || NET7_0_OR_GREATER - // /// - // /// Create API credentials using an API key and an RSA private key in PEM format - // /// - // public static ApiCredentials RsaPemCredentials(string publicKey, string privateKey) - // { - // return new ApiCredentials(new RSAPemCredential(publicKey, privateKey)); - // } - //#endif - - // /// - // /// Create API credentials using an API key and an RSA private key in XML format - // /// - // public static ApiCredentials RsaXmlCredentials(string publicKey, string privateKey) - // { - // return new ApiCredentials(new RSAXmlCredential(publicKey, privateKey)); - // } - - //#if NET8_0_OR_GREATER - // /// - // /// Create API credentials using an API key and an Ed25519 private key - // /// - // public static ApiCredentials Ed25519Credentials(string publicKey, string privateKey) - // { - // return new ApiCredentials(new ED25519Credential(publicKey, privateKey)); - // } - //#endif - - // /// - // /// Create API credentials using an API key and an Ecdsa private key - // /// - // public static ApiCredentials EcdsaCredentials(string publicKey, string privateKey) - // { - // return new ApiCredentials(new ECDSACredential(publicKey, privateKey)); - // } - - /// - /// Load a key from a file - /// -#warning check - public static string ReadFromFile(string path) - { - using var fileStream = File.OpenRead(path); - using var streamReader = new StreamReader(fileStream); - return streamReader.ReadToEnd(); - } - /// /// Copy the credentials ///