Place constants before non constants
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -27,6 +27,11 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
public class CoinJoinTabViewModel : WasabiDocumentTabViewModel, IWalletViewModel
{
+ private const string EnqueueButtonTextString = "Enqueue Selected Coins";
+ private const string EnqueuingButtonTextString = "Queuing coins...";
+ private const string DequeueButtonTextString = "Dequeue Selected Coins";
+ private const string DequeuingButtonTextString = "Dequeuing coins...";
+
private long _roundId;
private RoundPhaseState _roundPhaseState;
private DateTimeOffset _roundTimesout;
@@ -40,11 +45,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private bool _isEnqueueBusy;
private bool _isDequeueBusy;
private string _enqueueButtonText;
- private const string EnqueueButtonTextString = "Enqueue Selected Coins";
- private const string EnqueuingButtonTextString = "Queuing coins...";
private string _dequeueButtonText;
- private const string DequeueButtonTextString = "Dequeue Selected Coins";
- private const string DequeuingButtonTextString = "Dequeuing coins...";
private string _coinJoinUntilAnonymitySet;
public CoinJoinTabViewModel(Wallet wallet)

MODIFY
WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/ECISet.cs
WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/ECISet.cs
@@ -5,9 +5,6 @@ namespace Gma.QrCodeNet.Encoding.DataEncodation
{
public sealed class ECISet
{
- private Dictionary<string, int> _nameToValue;
- private Dictionary<int, string> _valueToName;
-
/// <summary>
/// ISO/IEC 18004:2006 Chapter 6.4.2 Mode indicator = 0111 Page 23
/// </summary>
@@ -15,6 +12,9 @@ namespace Gma.QrCodeNet.Encoding.DataEncodation
private const int ECIIndicatorNumBits = 4;
+ private Dictionary<string, int> _nameToValue;
+ private Dictionary<int, string> _valueToName;
+
/// <summary>
/// Initialize ECI Set.
/// </summary>

MODIFY
WalletWasabi/Gma/QrCodeNet/Encoding/QRCodeConstantVariable.cs
WalletWasabi/Gma/QrCodeNet/Encoding/QRCodeConstantVariable.cs
@@ -26,25 +26,25 @@ namespace Gma.QrCodeNet.Encoding
/// </summary>
internal const int PadeCodewordsOdd = 0xec;
+ /// <summary>
+ /// 0x11
+ /// </summary>
+ internal const int PadeCodewordsEven = 0x11;
+
+ internal const int PositionStencilWidth = 7;
+
internal static bool[] PadeOdd = new bool[]
{
true, true, true, false,
true, true, false, false
};
- /// <summary>
- /// 0x11
- /// </summary>
- internal const int PadeCodewordsEven = 0x11;
-
internal static bool[] PadeEven = new bool[]
{
false, false, false, true,
false, false, false, true
};
- internal const int PositionStencilWidth = 7;
-
/// <summary>
/// URL:http://en.wikipedia.org/wiki/Byte-order_mark
/// </summary>

MODIFY
WalletWasabi/Helpers/Constants.cs
WalletWasabi/Helpers/Constants.cs
@@ -8,13 +8,9 @@ namespace WalletWasabi.Helpers
{
public static class Constants
{
- public static readonly Version ClientVersion = new Version(1, 1, 11, 1);
public const string ClientSupportBackendVersionMin = "3";
public const string ClientSupportBackendVersionMax = "4";
public const string BackendMajorVersion = "3";
- public static readonly Version HwiVersion = new Version("1.1.0");
- public static readonly Version BitcoinCoreVersion = new Version("0.19.1");
- public static readonly Version LegalDocumentsVersion = new Version(2, 0);
/// <summary>
/// By changing this, we can force to start over the transactions file, so old incorrect transactions would be cleared.
@@ -24,35 +20,6 @@ namespace WalletWasabi.Helpers
public const uint ProtocolVersionWitnessVersion = 70012;
- public static readonly NodeRequirement NodeRequirements = new NodeRequirement
- {
- RequiredServices = NodeServices.NODE_WITNESS,
- MinVersion = ProtocolVersionWitnessVersion,
- MinProtocolCapabilities = new ProtocolCapabilities { SupportGetBlock = true, SupportWitness = true, SupportMempoolQuery = true }
- };
-
- public static readonly NodeRequirement LocalNodeRequirements = new NodeRequirement
- {
- RequiredServices = NodeServices.NODE_WITNESS,
- MinVersion = ProtocolVersionWitnessVersion,
- MinProtocolCapabilities = new ProtocolCapabilities { SupportGetBlock = true, SupportWitness = true }
- };
-
- public static readonly NodeRequirement LocalBackendNodeRequirements = new NodeRequirement
- {
- RequiredServices = NodeServices.NODE_WITNESS,
- MinVersion = ProtocolVersionWitnessVersion,
- MinProtocolCapabilities = new ProtocolCapabilities
- {
- SupportGetBlock = true,
- SupportWitness = true,
- SupportMempoolQuery = true,
- SupportSendHeaders = true,
- SupportPingPong = true,
- PeerTooOld = true
- }
- };
-
public const int P2wpkhInputSizeInBytes = 41;
public const int P2pkhInputSizeInBytes = 145;
public const int OutputSizeInBytes = 33;
@@ -88,6 +55,40 @@ namespace WalletWasabi.Helpers
public const long MaxSatoshisSupply = 2_100_000_000_000_000L;
+ public static readonly Version ClientVersion = new Version(1, 1, 11, 1);
+ public static readonly Version HwiVersion = new Version("1.1.0");
+ public static readonly Version BitcoinCoreVersion = new Version("0.19.1");
+ public static readonly Version LegalDocumentsVersion = new Version(2, 0);
+
+ public static readonly NodeRequirement NodeRequirements = new NodeRequirement
+ {
+ RequiredServices = NodeServices.NODE_WITNESS,
+ MinVersion = ProtocolVersionWitnessVersion,
+ MinProtocolCapabilities = new ProtocolCapabilities { SupportGetBlock = true, SupportWitness = true, SupportMempoolQuery = true }
+ };
+
+ public static readonly NodeRequirement LocalNodeRequirements = new NodeRequirement
+ {
+ RequiredServices = NodeServices.NODE_WITNESS,
+ MinVersion = ProtocolVersionWitnessVersion,
+ MinProtocolCapabilities = new ProtocolCapabilities { SupportGetBlock = true, SupportWitness = true }
+ };
+
+ public static readonly NodeRequirement LocalBackendNodeRequirements = new NodeRequirement
+ {
+ RequiredServices = NodeServices.NODE_WITNESS,
+ MinVersion = ProtocolVersionWitnessVersion,
+ MinProtocolCapabilities = new ProtocolCapabilities
+ {
+ SupportGetBlock = true,
+ SupportWitness = true,
+ SupportMempoolQuery = true,
+ SupportSendHeaders = true,
+ SupportPingPong = true,
+ PeerTooOld = true
+ }
+ };
+
public static readonly ExtPubKey FallBackCoordinatorExtPubKey = NBitcoinHelpers.BetterParseExtPubKey("xpub6D2PqhWBAbF3xgfaAUW73KnaCXUroArcgMTzNkNzfVX7ykkSzQGbqaXZeaNyxKbZojAAqDwsne6B7NcVhiTrXbGYrQNq1yF76NkgdonGrEa");
public static string[] UserAgents = new[]

Place constants before non constants