Add `EmptyResponse`
MODIFY
WalletWasabi.Backend/Controllers/WabiSabiController.cs
WalletWasabi.Backend/Controllers/WabiSabiController.cs
@@ -42,7 +42,7 @@ namespace WalletWasabi.Backend.Controllers
}
[HttpPost("output-registration")]
- public Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellableToken)
+ public Task<EmptyResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellableToken)
{
// TODO: Add idempotent.
return Arena.RegisterOutputAsync(request, cancellableToken);

MODIFY
WalletWasabi/WabiSabi/Backend/PostRequests/IWabiSabiApiRequestHandler.cs
WalletWasabi/WabiSabi/Backend/PostRequests/IWabiSabiApiRequestHandler.cs
@@ -10,7 +10,7 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
Task<ConnectionConfirmationResponse> ConfirmConnectionAsync(ConnectionConfirmationRequest request, CancellationToken cancellationToken);
- Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken);
+ Task<EmptyResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken);
Task RemoveInputAsync(InputsRemovalRequest request, CancellationToken cancellationToken);

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.Partial.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.Partial.cs
@@ -195,7 +195,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
}
}
- public async Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken)
+ public async Task<EmptyResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken)
{
using (await AsyncLock.LockAsync(cancellationToken).ConfigureAwait(false))
{
@@ -224,6 +224,8 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
round.Bobs.Add(bob);
round.CoinjoinState = newState;
}
+
+ return EmptyResponse.Instance;
}
public async Task SignTransactionAsync(TransactionSignaturesRequest request, CancellationToken cancellationToken)

MODIFY
WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs
WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs
@@ -44,8 +44,8 @@ namespace WalletWasabi.WabiSabi.Client
public Task<ConnectionConfirmationResponse> ConfirmConnectionAsync(ConnectionConfirmationRequest request, CancellationToken cancellationToken) =>
SendAndReceiveAsync<ConnectionConfirmationRequest, ConnectionConfirmationResponse>(RemoteAction.ConfirmConnection, request, cancellationToken);
- public Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken) =>
- SendAndReceiveAsync<OutputRegistrationRequest>(RemoteAction.RegisterOutput, request, cancellationToken);
+ public Task<EmptyResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken) =>
+ SendAndReceiveAsync<OutputRegistrationRequest, EmptyResponse>(RemoteAction.RegisterOutput, request, cancellationToken);
public Task<ReissueCredentialResponse> ReissuanceAsync(ReissueCredentialRequest request, CancellationToken cancellationToken) =>
SendAndReceiveAsync<ReissueCredentialRequest, ReissueCredentialResponse>(RemoteAction.ReissueCredential, request, cancellationToken);

ADD
WalletWasabi/WabiSabi/Models/EmptyResponse.cs
+namespace WalletWasabi.WabiSabi.Models
+{
+ public record EmptyResponse()
+ {
+ public static readonly EmptyResponse Instance = new();
+ }
+}

Add `EmptyResponse`