fix nullreference issue
MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -108,7 +108,6 @@ namespace WalletWasabi.Backend.Controllers
{
// Validate request.
if (!ModelState.IsValid
- || !request.AdditionalBlindedOutputScripts.Any()
|| !request.Inputs.Any()
|| request.Inputs.Any(x => x.Input == default(TxoRef)
|| x.Input.TransactionId is null))
@@ -116,6 +115,11 @@ namespace WalletWasabi.Backend.Controllers
return BadRequest("Invalid request.");
}
+ if (request.AdditionalBlindedOutputScripts is null) // Old clients.
+ {
+ request.AdditionalBlindedOutputScripts = new List<string>();
+ }
+
if (request.Inputs.Count() > 7)
{
return BadRequest("Maximum 7 inputs can be registered.");

MODIFY
WalletWasabi/Backend/Models/Requests/InputsRequest.cs
WalletWasabi/Backend/Models/Requests/InputsRequest.cs
@@ -17,7 +17,6 @@ namespace WalletWasabi.Backend.Models.Requests
[JsonConverter(typeof(Uint256JsonConverter))]
public uint256 BlindedOutputScript { get; set; }
- [Required]
public IEnumerable<string> AdditionalBlindedOutputScripts { get; set; }
[Required]

fix nullreference issue