Add minimal GetStatus API endpoint
MODIFY
WalletWasabi.Backend/Controllers/WabiSabiController.cs
WalletWasabi.Backend/Controllers/WabiSabiController.cs
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using WalletWasabi.WabiSabi.Backend.PostRequests;
using WalletWasabi.WabiSabi.Models;
@@ -11,9 +13,9 @@ namespace WalletWasabi.Backend.Controllers
[Route("[controller]")]
public class WabiSabiController : ControllerBase
{
- private IArenaRequestHandler handler;
+ private ArenaRequestHandler handler;
- public WabiSabiController(IArenaRequestHandler handler)
+ public WabiSabiController(ArenaRequestHandler handler)
{
this.handler = handler;
}
@@ -52,5 +54,10 @@ namespace WalletWasabi.Backend.Controllers
{
return handler.SignTransactionAsync(request, cancellableToken);
}
+
+ public IEnumerable<RoundState> GetStatusAsync(CancellationToken cancellableToken)
+ {
+ return handler.Arena.Rounds.Values.Select(x => RoundState.FromRound(x));
+ }
}
}

Add minimal GetStatus API endpoint