diff --git a/src/NiceHashBot/FormSettings.cs b/src/NiceHashBot/FormSettings.cs index 64f1506..74953bc 100644 --- a/src/NiceHashBot/FormSettings.cs +++ b/src/NiceHashBot/FormSettings.cs @@ -42,6 +42,12 @@ private void button1_Click(object sender, EventArgs e) } TwoFASecret = textBox2.Text; + if (TwoFASecret.Length != 0 && TwoFASecret.Length != 16) + { + MessageBox.Show("Two Factor secret key needs to be exactly 16 characters!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + textBox2.Focus(); + return; + } DialogResult = System.Windows.Forms.DialogResult.OK; Close(); diff --git a/src/NiceHashBot/Properties/AssemblyInfo.cs b/src/NiceHashBot/Properties/AssemblyInfo.cs index 6472d90..d977927 100644 --- a/src/NiceHashBot/Properties/AssemblyInfo.cs +++ b/src/NiceHashBot/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.3")] -[assembly: AssemblyFileVersion("1.0.1.3")] +[assembly: AssemblyVersion("1.0.1.4")] +[assembly: AssemblyFileVersion("1.0.1.4")] diff --git a/src/NiceHashBotLib/APIWrapper.cs b/src/NiceHashBotLib/APIWrapper.cs index fda39cc..a328d76 100644 --- a/src/NiceHashBotLib/APIWrapper.cs +++ b/src/NiceHashBotLib/APIWrapper.cs @@ -33,7 +33,7 @@ public class APIWrapper /// /// Total number of algorithms. /// - public readonly static int NUMBER_OF_ALGORITHMS = 13; + public readonly static int NUMBER_OF_ALGORITHMS = ALGORITHM_NAME.Length; /// /// Price decrease steps for all algorithms.