Nitpick on controllers
MODIFY
WalletWasabi.Backend/Controllers/BatchController.cs
WalletWasabi.Backend/Controllers/BatchController.cs
@@ -55,7 +55,7 @@ namespace WalletWasabi.Backend.Controllers
(Height bestHeight, IEnumerable<FilterModel> filters) = Global.IndexBuilderService.GetFilterLinesExcluding(knownHash, maxNumberOfFilters, out bool found);
var response = new SynchronizeResponse();
- response.Filters = new List<FilterModel>();
+ response.Filters = Enumerable.Empty<FilterModel>();
response.BestHeight = bestHeight;
if (!found)

MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -53,7 +53,7 @@ namespace WalletWasabi.Backend.Controllers
return Ok(response);
}
- internal static IEnumerable<CcjRunningRoundState> GetStatesCollection()
+ public static IEnumerable<CcjRunningRoundState> GetStatesCollection()
{
var response = new List<CcjRunningRoundState>();
@@ -106,8 +106,7 @@ namespace WalletWasabi.Backend.Controllers
public async Task<IActionResult> PostInputsAsync([FromBody, Required]InputsRequest request)
{
// Validate request.
- if (!ModelState.IsValid
- || request.Inputs.Any(x => x.Input == default(TxoRef)))
+ if (!ModelState.IsValid)
{
return BadRequest("Invalid request.");
}
@@ -161,7 +160,6 @@ namespace WalletWasabi.Backend.Controllers
uniqueInputs.Add(inputProof.Input);
}
-
var alicesToRemove = new HashSet<Guid>();
var getTxOutResponses = new List<(InputProofModel inputModel, Task<GetTxOutResponse> getTxOutTask)>();
@@ -205,7 +203,7 @@ namespace WalletWasabi.Backend.Controllers
foreach (var responses in getTxOutResponses)
{
var (inputProof, getTxOutResponseTask) = responses;
- var getTxOutResponse = getTxOutResponseTask.Result;
+ var getTxOutResponse = await getTxOutResponseTask;
// Check if inputs are unspent.
if (getTxOutResponse is null)

Nitpick on controllers