Move allowed script check: ArenaHandler -> Arena
MODIFY
WalletWasabi/WabiSabi/Backend/PostRequests/ArenaRequestHandler.cs
WalletWasabi/WabiSabi/Backend/PostRequests/ArenaRequestHandler.cs
@@ -72,11 +72,6 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
DisposeGuard();
using (RunningTasks.RememberWith(RunningRequests))
{
- if (!request.Script.IsScriptType(ScriptType.P2WPKH))
- {
- throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.ScriptNotAllowed);
- }
-
return await Arena.RegisterOutputAsync(request).ConfigureAwait(false);
}
}

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -366,6 +366,11 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
var credentialAmount = -request.AmountCredentialRequests.Delta;
+ if (!request.Script.IsScriptType(ScriptType.P2WPKH))
+ {
+ throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.ScriptNotAllowed, $"Round ({request.RoundId}): Script not allowed.");
+ }
+
Bob bob = new(request.Script, credentialAmount);
var outputValue = bob.CalculateOutputAmount(round.FeeRate);

Move allowed script check: ArenaHandler -> Arena