Remove leftover and format
MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
+using Microsoft.AspNetCore.Identity;
using NBitcoin;
using Newtonsoft.Json;
using System.Collections.Generic;
@@ -453,16 +454,16 @@ public class KeyManager
password ??= "";
- var pwHash = password.GetHashCode();
+ var passwordHash = password.GetHashCode();
- if (MasterKeyAndPasswordHash is { } hashAndKey)
+ if (MasterKeyAndPasswordHash is { MasterKey: var masterkey, PasswordHash: var storedPasswordHash })
{
- if (pwHash != hashAndKey.PasswordHash)
+ if (passwordHash != storedPasswordHash)
{
throw new SecurityException("Invalid password.");
}
- return hashAndKey.MasterKey;
+ return masterkey;
}
try
@@ -474,7 +475,7 @@ public class KeyManager
MasterFingerprint ??= secret.PubKey.GetHDFingerPrint();
DeriveTaprootExtPubKey(extKey);
- MasterKeyAndPasswordHash = (pwHash, extKey);
+ MasterKeyAndPasswordHash = (passwordHash, extKey);
return extKey;
}

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -528,12 +528,9 @@ public class CoinJoinClient
await Task.Delay(delay, cancellationToken).ConfigureAwait(false);
}
try
- {
- using (BenchmarkLogger.Measure(LogLevel.Debug, nameof(SignTransactionAsync)))
{
await aliceClient.SignTransactionAsync(unsignedCoinJoinTransaction, KeyChain, cancellationToken).ConfigureAwait(false);
}
- }
catch (WabiSabiProtocolException ex) when (ex.ErrorCode == WabiSabiProtocolErrorCode.WitnessAlreadyProvided)
{
Logger.LogDebug("Signature was already sent - bypassing error.", ex);

Remove leftover and format