Ignore calculated properties during serialization
MODIFY
WalletWasabi/WabiSabi/Crypto/CredentialRequesting/CredentialsRequest.cs
WalletWasabi/WabiSabi/Crypto/CredentialRequesting/CredentialsRequest.cs
using System.Linq;
using System.Collections.Generic;
-using NBitcoin;
using WalletWasabi.Crypto.Groups;
using WalletWasabi.Crypto.ZeroKnowledge;
using Newtonsoft.Json;
-using NBitcoin.Secp256k1;
+using System.ComponentModel.DataAnnotations;
namespace WalletWasabi.WabiSabi.Crypto.CredentialRequesting
{
@@ -65,11 +64,13 @@ namespace WalletWasabi.WabiSabi.Crypto.CredentialRequesting
/// <summary>
/// Serial numbers used in the credential presentations.
/// </summary>
+ [JsonIgnore]
internal IEnumerable<GroupElement> SerialNumbers => Presented.Select(x => x.S);
/// <summary>
/// Indicates whether the message contains duplicated serial numbers or not.
/// </summary>
+ [JsonIgnore]
internal bool AreThereDuplicatedSerialNumbers => SerialNumbers.Distinct().Count() < SerialNumbers.Count();
}
}

Ignore calculated properties during serialization