mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2024-11-14 11:18:14 +11:00
main: Fixed startup bugs
This commit is contained in:
parent
6daf6c5fe9
commit
9d0db3193c
@ -35,6 +35,7 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
private void MainForm_Load(object sender, EventArgs e)
|
private void MainForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
account = "";
|
||||||
timerNodeStatus.Stop();
|
timerNodeStatus.Stop();
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ namespace FireWallet
|
|||||||
|
|
||||||
AddLog("Loaded");
|
AddLog("Loaded");
|
||||||
batchMode = false;
|
batchMode = false;
|
||||||
|
textBoxaccountpassword.Focus();
|
||||||
timerNodeStatus.Start();
|
timerNodeStatus.Start();
|
||||||
}
|
}
|
||||||
private void MainForm_Closing(object sender, FormClosingEventArgs e)
|
private void MainForm_Closing(object sender, FormClosingEventArgs e)
|
||||||
@ -381,6 +382,7 @@ namespace FireWallet
|
|||||||
comboBoxaccount.Items.Clear();
|
comboBoxaccount.Items.Clear();
|
||||||
if (APIresponse != "Error")
|
if (APIresponse != "Error")
|
||||||
{
|
{
|
||||||
|
comboBoxaccount.Enabled = true;
|
||||||
JArray jArray = JArray.Parse(APIresponse);
|
JArray jArray = JArray.Parse(APIresponse);
|
||||||
foreach (string account in jArray)
|
foreach (string account in jArray)
|
||||||
{
|
{
|
||||||
@ -401,7 +403,6 @@ namespace FireWallet
|
|||||||
comboBoxaccount.Items.Add("No accounts found");
|
comboBoxaccount.Items.Add("No accounts found");
|
||||||
comboBoxaccount.Enabled = false;
|
comboBoxaccount.Enabled = false;
|
||||||
}
|
}
|
||||||
textBoxaccountpassword.Focus();
|
|
||||||
}
|
}
|
||||||
private async Task<bool> Login()
|
private async Task<bool> Login()
|
||||||
{
|
{
|
||||||
@ -497,11 +498,14 @@ namespace FireWallet
|
|||||||
if (await APIGet("", false) == "Error")
|
if (await APIGet("", false) == "Error")
|
||||||
{
|
{
|
||||||
toolStripStatusLabelstatus.Text = "Status: Node Not Connected";
|
toolStripStatusLabelstatus.Text = "Status: Node Not Connected";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (toolStripStatusLabelstatus.Text != "Status: Node Connected") GetAccounts(); // Get accounts if node was not connected before
|
||||||
toolStripStatusLabelstatus.Text = "Status: Node Connected";
|
toolStripStatusLabelstatus.Text = "Status: Node Connected";
|
||||||
}
|
}
|
||||||
|
if (account == "") return; // Don't update balance if not logged in
|
||||||
|
|
||||||
// Try to keep wallet unlocked
|
// Try to keep wallet unlocked
|
||||||
string path = "wallet/" + account + "/unlock";
|
string path = "wallet/" + account + "/unlock";
|
||||||
|
Loading…
Reference in New Issue
Block a user