Modify `CredentialIssuer` to accept 0 requests
MODIFY
WalletWasabi/WabiSabi/Client/ArenaClient.cs
WalletWasabi/WabiSabi/Client/ArenaClient.cs
@@ -76,13 +76,13 @@ namespace WalletWasabi.WabiSabi.Client
var presentedAmount = amountCredentialsToPresent.Sum(x => x.Value);
var (realAmountCredentialRequest, realAmountCredentialResponseValidation) = AmountCredentialClient.CreateRequest(
- new[] { presentedAmount - amount }, // FIXME remove
+ new[] { 0L },
amountCredentialsToPresent,
cancellationToken);
var presentedVsize = vsizeCredentialsToPresent.Sum(x => x.Value);
var (realVsizeCredentialRequest, realVsizeCredentialResponseValidation) = VsizeCredentialClient.CreateRequest(
- new[] { presentedVsize - scriptPubKey.EstimateOutputVsize() }, // FIXME remove
+ new[] { 0L },
vsizeCredentialsToPresent,
cancellationToken);

MODIFY
WalletWasabi/WabiSabi/Crypto/CredentialIssuer.cs
WalletWasabi/WabiSabi/Crypto/CredentialIssuer.cs
@@ -108,6 +108,7 @@ namespace WalletWasabi.WabiSabi.Crypto
var presented = registrationRequest.Presented ?? Enumerable.Empty<CredentialPresentation>();
var requestedCount = requested.Count();
+ var requiredNumberOfRequested = registrationRequest.IsPresentationOnlyRequest ? 0 : NumberOfCredentials;
if (requestedCount != NumberOfCredentials)
{
throw new WabiSabiCryptoException(

MODIFY
WalletWasabi/WabiSabi/Crypto/CredentialRequesting/CredentialsRequest.cs
WalletWasabi/WabiSabi/Crypto/CredentialRequesting/CredentialsRequest.cs
@@ -61,6 +61,12 @@ namespace WalletWasabi.WabiSabi.Crypto.CredentialRequesting
[JsonIgnore]
internal bool IsNullRequest => Delta == 0 && !Presented.Any();
+ /// <summary>
+ /// Is request for credential presentation only.
+ /// </summary>
+ [JsonIgnore]
+ internal bool IsPresentationOnlyRequest => Delta < 0 && !Requested.Any();
+
/// <summary>
/// Serial numbers used in the credential presentations.
/// </summary>

Modify `CredentialIssuer` to accept 0 requests