diff --git a/src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs b/src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs index 57e5d20f39..9445b1ba2f 100644 --- a/src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs +++ b/src/Api/KeyManagement/Models/Response/PrivateKeysResponseModel.cs @@ -18,7 +18,7 @@ public class PrivateKeysResponseModel : ResponseModel public PrivateKeysResponseModel(UserAccountKeysData accountKeys) : base("privateKeys") { PublicKeyEncryptionKeyPair = new PublicKeyEncryptionKeyPairModel(accountKeys.PublicKeyEncryptionKeyPairData); - ArgumentNullException.ThrowIfNull(accountKeys); + ArgumentNullException.ThrowIfNull(accountKeys); if (accountKeys.SignatureKeyPairData != null) { diff --git a/src/Api/KeyManagement/Models/Response/PublicKeysResponseModel.cs b/src/Api/KeyManagement/Models/Response/PublicKeysResponseModel.cs index 5d3e6ffa21..8c2bde58aa 100644 --- a/src/Api/KeyManagement/Models/Response/PublicKeysResponseModel.cs +++ b/src/Api/KeyManagement/Models/Response/PublicKeysResponseModel.cs @@ -16,10 +16,7 @@ public class PublicKeysResponseModel : ResponseModel : base("publicKeys") { PublicKey = accountKeys.PublicKeyEncryptionKeyPairData.PublicKey; - if (accountKeys == null) - { - throw new ArgumentNullException(nameof(accountKeys)); - } + ArgumentNullException.ThrowIfNull(accountKeys); if (accountKeys.SignatureKeyPairData != null) { diff --git a/src/Api/KeyManagement/Models/Response/SignatureKeyPairResponseModel.cs b/src/Api/KeyManagement/Models/Response/SignatureKeyPairResponseModel.cs index 76fb8aad10..395f481abd 100644 --- a/src/Api/KeyManagement/Models/Response/SignatureKeyPairResponseModel.cs +++ b/src/Api/KeyManagement/Models/Response/SignatureKeyPairResponseModel.cs @@ -15,11 +15,7 @@ public class SignatureKeyPairResponseModel : ResponseModel public SignatureKeyPairResponseModel(SignatureKeyPairData signatureKeyPair) : base("signatureKeyPair") { - if (signatureKeyPair == null) - { - throw new ArgumentNullException(nameof(signatureKeyPair)); - } - + ArgumentNullException.ThrowIfNull(signatureKeyPair); WrappedSigningKey = signatureKeyPair.WrappedSigningKey; VerifyingKey = signatureKeyPair.VerifyingKey; }