`ReadyToSignRequestRequest`: Add equality tests.
ADD
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/ReadyToSignRequestRequestTests.cs
+using NBitcoin;
+using System;
+using WalletWasabi.Tests.Helpers;
+using WalletWasabi.WabiSabi.Backend.PostRequests;
+using Xunit;
+
+namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
+{
+ /// <summary>
+ /// Tests for <see cref="ReadyToSignRequestRequest"/> class.
+ /// </summary>
+ public class ReadyToSignRequestRequestTests
+ {
+ [Fact]
+ public void EqualityTest()
+ {
+ uint256 roundId = BitcoinFactory.CreateUint256();
+ Guid guid = Guid.NewGuid();
+
+ // Request #1.
+ ReadyToSignRequestRequest request1 = new(RoundId: roundId, AliceId: guid);
+
+ // Request #2.
+ ReadyToSignRequestRequest request2 = new(RoundId: roundId, AliceId: guid);
+
+ Assert.Equal(request1, request2);
+
+ // Request #3.
+ ReadyToSignRequestRequest request3 = new(RoundId: BitcoinFactory.CreateUint256(), AliceId: guid);
+
+ Assert.NotEqual(request1, request3);
+ }
+ }
+}

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.Partial.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.Partial.cs
@@ -53,7 +53,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.WrongOwnershipProof);
}
- // Generate a new Guid with the secure random source, to be sure
+ // Generate a new GUID with the secure random source, to be sure
// that it is not guessable (Guid.NewGuid() documentation does
// not say anything about GUID version or randomness source,
// only that the probability of duplicates is very low).

MODIFY
WalletWasabi/WabiSabi/Models/ReadyToSignRequestRequest.cs
WalletWasabi/WabiSabi/Models/ReadyToSignRequestRequest.cs
using NBitcoin;
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using WalletWasabi.Crypto;
namespace WalletWasabi.WabiSabi.Backend.PostRequests
{
- public record ReadyToSignRequestRequest(
- uint256 RoundId,
- Guid AliceId);
+ public record ReadyToSignRequestRequest(uint256 RoundId, Guid AliceId);
}

`ReadyToSignRequestRequest`: Add equality tests.