Improve constructor
MODIFY
WalletWasabi.Tests/UnitTests/Wabisabi/CredentialTests.cs
WalletWasabi.Tests/UnitTests/Wabisabi/CredentialTests.cs
@@ -260,8 +260,6 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
var proofs = validCredentialRequest.Proofs.ToArray();
proofs[0] = proofs[1];
var invalidCredentialRequest = new ZeroCredentialsRequest(
- validCredentialRequest.Delta,
- validCredentialRequest.Presented,
validCredentialRequest.Requested,
proofs);

MODIFY
WalletWasabi.Tests/UnitTests/Wabisabi/SerializationTests.cs
WalletWasabi.Tests/UnitTests/Wabisabi/SerializationTests.cs
@@ -167,7 +167,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi
// Registration request message.
var serializedRequestMessage = JsonConvert.SerializeObject(credentialRequest, converters);
- Assert.Throws<InvalidOperationException>(() => JsonConvert.DeserializeObject<ZeroCredentialsRequest>(serializedRequestMessage, converters));
+ Assert.Throws<NotSupportedException>(() => JsonConvert.DeserializeObject<ZeroCredentialsRequest>(serializedRequestMessage, converters));
var deserializedRequestMessage = JsonConvert.DeserializeObject<RealCredentialsRequest>(serializedRequestMessage, converters);
var reserializedRequestMessage = JsonConvert.SerializeObject(deserializedRequestMessage, converters);
Assert.Equal(serializedRequestMessage, reserializedRequestMessage);

MODIFY
WalletWasabi/WabiSabi/Crypto/CredentialRequesting/ZeroCredentialsRequest.cs
WalletWasabi/WabiSabi/Crypto/CredentialRequesting/ZeroCredentialsRequest.cs
@@ -12,11 +12,9 @@ namespace WalletWasabi.WabiSabi.Crypto.CredentialRequesting
public class ZeroCredentialsRequest : CredentialsRequest
{
public ZeroCredentialsRequest(
- long delta,
- IEnumerable<CredentialPresentation> presented,
IEnumerable<IssuanceRequest> requested,
IEnumerable<Proof> proofs)
- : base(delta, presented, requested, proofs)
+ : base(0, Array.Empty<CredentialPresentation>(), requested, proofs)
{
if (!IsNullRequest)
{

MODIFY
WalletWasabi/WabiSabi/Crypto/WabiSabiClient.cs
WalletWasabi/WabiSabi/Crypto/WabiSabiClient.cs
@@ -70,8 +70,6 @@ namespace WalletWasabi.WabiSabi.Crypto
return (
new ZeroCredentialsRequest(
- 0,
- Enumerable.Empty<CredentialPresentation>(),
credentialsToRequest,
ProofSystem.Prove(transcript, knowledge, RandomNumberGenerator)),
new CredentialsResponseValidation(

Improve constructor