Refactor to tuplehash
MODIFY
WalletWasabi.Gui/Models/StatusBarStatuses/Status.cs
WalletWasabi.Gui/Models/StatusBarStatuses/Status.cs
@@ -62,7 +62,7 @@ namespace WalletWasabi.Gui.Models.StatusBarStatuses
public bool Equals(Status other) => this == other;
- public override int GetHashCode() => Type.GetHashCode() ^ Percentage.GetHashCode();
+ public override int GetHashCode() => (Type, Percentage).GetHashCode();
public static bool operator ==(Status x, Status y) => y?.Type == x?.Type && y?.Percentage == x?.Percentage;

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
WalletWasabi/Blockchain/TransactionOutputs/SmartCoin.cs
@@ -323,7 +323,7 @@ namespace WalletWasabi.Blockchain.TransactionOutputs
public bool Equals(SmartCoin other) => this == other;
- public override int GetHashCode() => TransactionId.GetHashCode() ^ (int)Index;
+ public override int GetHashCode() => (TransactionId, Index).GetHashCode();
public static bool operator ==(SmartCoin x, SmartCoin y) => y?.TransactionId == x?.TransactionId && y?.Index == x?.Index;

MODIFY
WalletWasabi/Blockchain/TransactionOutputs/TxoRef.cs
WalletWasabi/Blockchain/TransactionOutputs/TxoRef.cs
@@ -43,7 +43,7 @@ namespace WalletWasabi.Blockchain.TransactionOutputs
public bool Equals(TxoRef other) => this == other;
- public override int GetHashCode() => TransactionId.GetHashCode() ^ (int)Index;
+ public override int GetHashCode() => (TransactionId, Index).GetHashCode();
public static bool operator ==(TxoRef x, TxoRef y) => y?.TransactionId == x?.TransactionId && y?.Index == x?.Index;

MODIFY
WalletWasabi/CoinJoin/Common/Crypto/SchnorrKey.cs
WalletWasabi/CoinJoin/Common/Crypto/SchnorrKey.cs
@@ -34,7 +34,7 @@ namespace WalletWasabi.CoinJoin.Common.Crypto
public bool Equals(SchnorrKey other) => this == other;
- public override int GetHashCode() => SignerKey.GetHashCode() ^ Rkey.GetHashCode();
+ public override int GetHashCode() => (SignerKey, Rkey).GetHashCode();
public static bool operator ==(SchnorrKey x, SchnorrKey y) => y?.SignerKey == x?.SignerKey && y?.Rkey == x?.Rkey;

MODIFY
WalletWasabi/CoinJoin/Common/Crypto/SchnorrPubKey.cs
WalletWasabi/CoinJoin/Common/Crypto/SchnorrPubKey.cs
@@ -48,7 +48,7 @@ namespace WalletWasabi.CoinJoin.Common.Crypto
public bool Equals(SchnorrPubKey other) => this == other;
- public override int GetHashCode() => SignerPubKey.GetHashCode() ^ RpubKey.GetHashCode();
+ public override int GetHashCode() => (SignerPubKey, RpubKey).GetHashCode();
public static bool operator ==(SchnorrPubKey x, SchnorrPubKey y) => y?.SignerPubKey == x?.SignerPubKey && y?.RpubKey == x?.RpubKey;

MODIFY
WalletWasabi/CoinJoin/Coordinator/MixingLevels/MixingLevel.cs
WalletWasabi/CoinJoin/Coordinator/MixingLevels/MixingLevel.cs
@@ -57,7 +57,7 @@ namespace WalletWasabi.CoinJoin.Coordinator.MixingLevels
public bool Equals(MixingLevel other) => this == other;
- public override int GetHashCode() => Denomination.GetHashCode() ^ SchnorrKey.GetHashCode();
+ public override int GetHashCode() => (Denomination, SchnorrKey).GetHashCode();
public static bool operator ==(MixingLevel x, MixingLevel y) => y?.Denomination == x?.Denomination && y?.SchnorrKey == x?.SchnorrKey;

MODIFY
WalletWasabi/Hwi/Models/HwiOption.cs
WalletWasabi/Hwi/Models/HwiOption.cs
@@ -44,7 +44,7 @@ namespace WalletWasabi.Hwi.Models
public bool Equals(HwiOption other) => this == other;
- public override int GetHashCode() => Type.GetHashCode() ^ Arguments.GetHashCode();
+ public override int GetHashCode() => (Type, Arguments).GetHashCode();
public static bool operator ==(HwiOption x, HwiOption y) => x?.Type == y?.Type && x?.Arguments == y?.Arguments;

MODIFY
WalletWasabi/Models/UpdateStatus.cs
WalletWasabi/Models/UpdateStatus.cs
@@ -21,7 +21,7 @@ namespace WalletWasabi.Models
public bool Equals(UpdateStatus other) => this == other;
- public override int GetHashCode() => ClientUpToDate.GetHashCode() ^ BackendCompatible.GetHashCode();
+ public override int GetHashCode() => (ClientUpToDate, BackendCompatible).GetHashCode();
public static bool operator ==(UpdateStatus x, UpdateStatus y) => y?.ClientUpToDate == x?.ClientUpToDate && y?.BackendCompatible == x?.BackendCompatible;

Refactor to tuplehash