main: Fixed click on text in domains and tx history doesn't open window

This commit is contained in:
Nathan Woodburn 2023-06-14 14:07:03 +10:00
parent 2109879f93
commit bf2e41058d
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -301,6 +301,7 @@ namespace FireWallet
#region Logging #region Logging
public void AddLog(string message) public void AddLog(string message)
{ {
if (message.Contains("Get Error: No connection could be made because the target machine actively refused it")) return;
StreamWriter sw = new StreamWriter(dir + "log.txt", true); StreamWriter sw = new StreamWriter(dir + "log.txt", true);
sw.WriteLine(DateTime.Now.ToString() + ": " + message); sw.WriteLine(DateTime.Now.ToString() + ": " + message);
sw.Dispose(); sw.Dispose();
@ -743,8 +744,7 @@ namespace FireWallet
{ {
if (content == "{\"passphrase\": \"\",\"timeout\": 60}") if (content == "{\"passphrase\": \"\",\"timeout\": 60}")
{ {
// For some reason, the API doesn't like an empty password, so we'll just use a default one return "";
content = "{\"passphrase\": \"password\" ,\"timeout\": 60}";
} }
string key = nodeSettings["Key"]; string key = nodeSettings["Key"];
string ip = nodeSettings["IP"]; string ip = nodeSettings["IP"];
@ -770,6 +770,7 @@ namespace FireWallet
catch (Exception ex) catch (Exception ex)
{ {
AddLog("Post Error: " + ex.Message); AddLog("Post Error: " + ex.Message);
AddLog("Content: " + content);
return "Error"; return "Error";
} }
@ -934,6 +935,15 @@ namespace FireWallet
TXForm txForm = new TXForm(this, tx); TXForm txForm = new TXForm(this, tx);
txForm.Show(); txForm.Show();
}; };
foreach (Control c in tmpPanel.Controls)
{
c.Click += (sender, e) =>
{
TXForm txForm = new TXForm(this, tx);
txForm.Show();
};
}
tmpControls[i] = tmpPanel; tmpControls[i] = tmpPanel;
@ -1606,13 +1616,6 @@ namespace FireWallet
domainTMP.Left = 10; domainTMP.Left = 10;
domainTMP.BorderStyle = BorderStyle.FixedSingle; domainTMP.BorderStyle = BorderStyle.FixedSingle;
// On Click open domain
domainTMP.Click += new EventHandler((sender, e) =>
{
DomainForm domainForm = new DomainForm(this, name["name"].ToString(), userSettings["explorer-tx"], userSettings["explorer-domain"]);
domainForm.Show();
});
Label domainName = new Label(); Label domainName = new Label();
domainName.Text = Domains[i]; domainName.Text = Domains[i];
domainName.Top = 5; domainName.Top = 5;
@ -1651,8 +1654,23 @@ namespace FireWallet
} }
// On Click open domain
domainTMP.Click += new EventHandler((sender, e) =>
{
DomainForm domainForm = new DomainForm(this, name["name"].ToString(), userSettings["explorer-tx"], userSettings["explorer-domain"]);
domainForm.Show();
});
foreach (Control c in domainTMP.Controls)
{
c.Click += new EventHandler((sender, e) =>
{
DomainForm domainForm = new DomainForm(this, name["name"].ToString(), userSettings["explorer-tx"], userSettings["explorer-domain"]);
domainForm.Show();
});
}
panelDomainList.Controls.Add(domainTMP); panelDomainList.Controls.Add(domainTMP);
i++; i++;
} }