Add bool return to ArenaClient.ConfirmConnectionAsync
MODIFY
WalletWasabi/WabiSabi/Client/AliceClient.cs
WalletWasabi/WabiSabi/Client/AliceClient.cs
@@ -54,15 +54,13 @@ namespace WalletWasabi.WabiSabi.Client
var amountCredentials = ArenaClient.AmountCredentialClient.Credentials;
- await ArenaClient.ConfirmConnectionAsync(
+ return await ArenaClient.ConfirmConnectionAsync(
RoundId,
AliceId,
inputRemainingWeights,
amountCredentials.ZeroValue.Take(ArenaClient.ProtocolCredentialNumber),
Coins.Select(c => c.Amount)
).ConfigureAwait(false);
-
- return ArenaClient.AmountCredentialClient.Credentials.Valuable.Any();
}
public async Task RemoveInputAsync()

MODIFY
WalletWasabi/WabiSabi/Client/ArenaClient.cs
WalletWasabi/WabiSabi/Client/ArenaClient.cs
@@ -115,7 +115,7 @@ namespace WalletWasabi.WabiSabi.Client
WeightCredentialClient.HandleResponse(outputRegistrationResponse.WeightCredentials, realWeightCredentialResponseValidation);
}
- public async Task ConfirmConnectionAsync(Guid roundId, Guid aliceId, IEnumerable<long> inputsRegistrationWeight, IEnumerable<Credential> amountCredentialsToPresent, IEnumerable<Money> newAmount)
+ public async Task<bool> ConfirmConnectionAsync(Guid roundId, Guid aliceId, IEnumerable<long> inputsRegistrationWeight, IEnumerable<Credential> amountCredentialsToPresent, IEnumerable<Money> newAmount)
{
Guard.InRange(nameof(newAmount), newAmount, 1, AmountCredentialClient.NumberOfCredentials);
Guard.InRange(nameof(amountCredentialsToPresent), amountCredentialsToPresent, 1, AmountCredentialClient.NumberOfCredentials);
@@ -141,13 +141,16 @@ namespace WalletWasabi.WabiSabi.Client
zeroWeightCredentialRequestData.CredentialsRequest,
realWeightCredentialRequestData.CredentialsRequest)).ConfigureAwait(false);
+ bool gotRealCredentials = false;
if (confirmConnectionResponse is { RealAmountCredentials: { }, RealWeightCredentials: { } })
{
AmountCredentialClient.HandleResponse(confirmConnectionResponse.RealAmountCredentials, realAmountCredentialRequestData.CredentialsResponseValidation);
WeightCredentialClient.HandleResponse(confirmConnectionResponse.RealWeightCredentials, realWeightCredentialRequestData.CredentialsResponseValidation);
+ gotRealCredentials = true;
}
AmountCredentialClient.HandleResponse(confirmConnectionResponse.ZeroAmountCredentials, zeroAmountCredentialRequestData.CredentialsResponseValidation);
WeightCredentialClient.HandleResponse(confirmConnectionResponse.ZeroWeightCredentials, zeroWeightCredentialRequestData.CredentialsResponseValidation);
+ return gotRealCredentials;
}
public async Task SignTransactionAsync(Guid roundId, IEnumerable<ICoin> coinsToSign, BitcoinSecret bitcoinSecret, Transaction unsignedCoinJoin)

Add bool return to ArenaClient.ConfirmConnectionAsync