Fix CodeFactor style issues
MODIFY
WalletWasabi/BitcoinCore/Rpc/RpcErrorTools.cs
WalletWasabi/BitcoinCore/Rpc/RpcErrorTools.cs
@@ -14,12 +14,6 @@ namespace WalletWasabi.BitcoinCore.Rpc
public const string SpentErrorTranslation = "At least one coin you are trying to spend is already spent.";
- public static bool IsSpentError(string error)
- => new[] { SpentError1, SpentError2, SpentError3 }.Any(x => error.Contains(x, StringComparison.OrdinalIgnoreCase));
-
- public static bool IsTooLongMempoolChainError(string error)
- => error.Contains(TooLongMempoolChainError, StringComparison.OrdinalIgnoreCase);
-
public static Dictionary<string, string> ErrorTranslations { get; } = new Dictionary<string, string>
{
[TooLongMempoolChainError] = "At least one coin you are trying to spend is part of long or heavy chain of unconfirmed transactions. You must wait for some previous transactions to confirm.",
@@ -34,5 +28,13 @@ namespace WalletWasabi.BitcoinCore.Rpc
["Invalid wallet name"] = "Invalid wallet name.",
["Wallet name is already taken"] = "Wallet name is already taken."
};
+
+ public static bool IsSpentError(string error)
+ {
+ return new[] { SpentError1, SpentError2, SpentError3 }.Any(x => error.Contains(x, StringComparison.OrdinalIgnoreCase));
+ }
+
+ public static bool IsTooLongMempoolChainError(string error)
+ => error.Contains(TooLongMempoolChainError, StringComparison.OrdinalIgnoreCase);
}
}

MODIFY
WalletWasabi/Extensions/RPCClientExtensions.cs
WalletWasabi/Extensions/RPCClientExtensions.cs
@@ -187,6 +187,7 @@ namespace NBitcoin.RPC
{
var largeTargetFeeResult = await rpc.EstimateSmartFeeAsync(largeTarget, estimateMode, simulateIfRegTest, tolerateBitcoinCoreBrainfuck);
largeTargetFee = (int)Math.Ceiling(largeTargetFeeResult.FeeRate.SatoshiPerByte);
+
// Blocks should be never larger than the target that we asked for, so it's just a sanity check.
largeTarget = Math.Min(largeTarget, largeTargetFeeResult.Blocks);
newEstimations.TryAdd(largeTarget, largeTargetFee);
@@ -195,6 +196,7 @@ namespace NBitcoin.RPC
int halfTarget = (smallTarget + largeTarget) / 2;
var halfFeeResult = await rpc.EstimateSmartFeeAsync(halfTarget, estimateMode, simulateIfRegTest, tolerateBitcoinCoreBrainfuck);
int halfTargetFee = (int)Math.Ceiling(halfFeeResult.FeeRate.SatoshiPerByte);
+
// Blocks should be never larger than the target that we asked for, so it's just a sanity check.
halfTarget = Math.Min(halfTarget, halfFeeResult.Blocks);
newEstimations.TryAdd(halfTarget, halfTargetFee);

Fix CodeFactor style issues