From 218b0a0bbf7103848e2873309f9571a11829c96b Mon Sep 17 00:00:00 2001 From: Vitalik Knysh Date: Mon, 8 Apr 2024 00:32:36 +0300 Subject: [PATCH] Fixed the private key check in CheckRequired --- LiqPaySDK/LiqPay.SDK/LiqPayClient.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/LiqPaySDK/LiqPay.SDK/LiqPayClient.cs b/LiqPaySDK/LiqPay.SDK/LiqPayClient.cs index 627ff9b..a3e68e4 100644 --- a/LiqPaySDK/LiqPay.SDK/LiqPayClient.cs +++ b/LiqPaySDK/LiqPay.SDK/LiqPayClient.cs @@ -41,10 +41,14 @@ public LiqPayClient(string publicKey, string privateKey, WebProxy proxy) private void CheckRequired() { if (string.IsNullOrEmpty(_publicKey)) + { throw new ArgumentNullException("publicKey is empty"); + } - if (string.IsNullOrEmpty(_publicKey)) + if (string.IsNullOrEmpty(_privateKey)) + { throw new ArgumentNullException("privateKey is empty"); + } } public async Task RequestAsync(string path, LiqPayRequest requestParams)