WabiSabiConroller: Depend on `Arena` insted on `ArenaRequestHandler`
MODIFY
WalletWasabi.Backend/Controllers/WabiSabiController.cs
WalletWasabi.Backend/Controllers/WabiSabiController.cs
@@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WalletWasabi.Backend.Filters;
using WalletWasabi.WabiSabi.Backend.PostRequests;
+using WalletWasabi.WabiSabi.Backend.Rounds;
using WalletWasabi.WabiSabi.Models;
namespace WalletWasabi.Backend.Controllers
@@ -13,63 +14,63 @@ namespace WalletWasabi.Backend.Controllers
[Produces("application/json")]
public class WabiSabiController : ControllerBase, IWabiSabiApiRequestHandler
{
- public WabiSabiController(ArenaRequestHandler handler)
+ public WabiSabiController(Arena arena)
{
- RequestHandler = handler;
+ Arena = arena;
}
- private ArenaRequestHandler RequestHandler { get; }
+ private Arena Arena { get; }
[HttpGet("status")]
public Task<RoundState[]> GetStatusAsync(CancellationToken cancellationToken)
{
- return RequestHandler.GetStatusAsync(cancellationToken);
+ return Arena.GetStatusAsync(cancellationToken);
}
[HttpPost("connection-confirmation")]
[Idempotent]
public Task<ConnectionConfirmationResponse> ConfirmConnectionAsync(ConnectionConfirmationRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.ConfirmConnectionAsync(request, cancellableToken);
+ return Arena.ConfirmConnectionAsync(request, cancellableToken);
}
[HttpPost("input-registration")]
[Idempotent]
public Task<InputRegistrationResponse> RegisterInputAsync(InputRegistrationRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.RegisterInputAsync(request, cancellableToken);
+ return Arena.RegisterInputAsync(request, cancellableToken);
}
[HttpPost("output-registration")]
[Idempotent]
public Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.RegisterOutputAsync(request, cancellableToken);
+ return Arena.RegisterOutputAsync(request, cancellableToken);
}
[HttpPost("credential-issuance")]
[Idempotent]
public Task<ReissueCredentialResponse> ReissuanceAsync(ReissueCredentialRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.ReissueCredentialAsync(request, cancellableToken);
+ return Arena.ReissuanceAsync(request, cancellableToken);
}
[HttpPost("input-unregistration")]
public Task RemoveInputAsync(InputsRemovalRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.RemoveInputAsync(request, cancellableToken);
+ return Arena.RemoveInputAsync(request, cancellableToken);
}
[HttpPost("transaction-signature")]
public Task SignTransactionAsync(TransactionSignaturesRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.SignTransactionAsync(request, cancellableToken);
+ return Arena.SignTransactionAsync(request, cancellableToken);
}
[HttpPost("ready-to-sign")]
public Task ReadyToSignAsync(ReadyToSignRequestRequest request, CancellationToken cancellableToken)
{
- return RequestHandler.ReadyToSignAsync(request, cancellableToken);
+ return Arena.ReadyToSignAsync(request, cancellableToken);
}
}
}

WabiSabiConroller: Depend on `Arena` insted on `ArenaRequestHandler`