mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2025-12-06 08:33:00 +11:00
Compare commits
13 Commits
v3.2
...
newBrandin
| Author | SHA1 | Date | |
|---|---|---|---|
|
d41c72faff
|
|||
|
a4a35ad62e
|
|||
|
9f0f7214e2
|
|||
|
742cd9bafd
|
|||
|
9f33c74bb0
|
|||
|
8f241fc90a
|
|||
|
dc09194759
|
|||
|
638a367029
|
|||
|
026849575d
|
|||
|
d1a150114e
|
|||
|
5d59bdee64
|
|||
|
74548a22e2
|
|||
|
ac2aa06888
|
@@ -1,12 +1,11 @@
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security.Principal;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.VisualBasic;
|
using System.Windows.Forms.VisualStyles;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using ContentAlignment = System.Drawing.ContentAlignment;
|
||||||
using Point = System.Drawing.Point;
|
using Point = System.Drawing.Point;
|
||||||
|
|
||||||
namespace FireWallet
|
namespace FireWallet
|
||||||
@@ -60,7 +59,7 @@ namespace FireWallet
|
|||||||
List<Batch> temp = new List<Batch>();
|
List<Batch> temp = new List<Batch>();
|
||||||
foreach (Batch batch in batches)
|
foreach (Batch batch in batches)
|
||||||
{
|
{
|
||||||
if (batch.domain != domain && batch.method != operation)
|
if (batch.domain != domain || batch.method != operation)
|
||||||
{
|
{
|
||||||
temp.Add(batch);
|
temp.Add(batch);
|
||||||
}
|
}
|
||||||
@@ -124,7 +123,7 @@ namespace FireWallet
|
|||||||
List<Batch> temp = new List<Batch>();
|
List<Batch> temp = new List<Batch>();
|
||||||
foreach (Batch batch in batches)
|
foreach (Batch batch in batches)
|
||||||
{
|
{
|
||||||
if (batch.domain != domain && batch.method != operation)
|
if (batch.domain != domain || batch.method != operation)
|
||||||
{
|
{
|
||||||
temp.Add(batch);
|
temp.Add(batch);
|
||||||
}
|
}
|
||||||
@@ -184,7 +183,7 @@ namespace FireWallet
|
|||||||
List<Batch> temp = new List<Batch>();
|
List<Batch> temp = new List<Batch>();
|
||||||
foreach (Batch batch in batches)
|
foreach (Batch batch in batches)
|
||||||
{
|
{
|
||||||
if (batch.domain != domain && batch.method != operation)
|
if (batch.domain != domain || batch.method != operation)
|
||||||
{
|
{
|
||||||
temp.Add(batch);
|
temp.Add(batch);
|
||||||
}
|
}
|
||||||
@@ -240,7 +239,7 @@ namespace FireWallet
|
|||||||
List<Batch> temp = new List<Batch>();
|
List<Batch> temp = new List<Batch>();
|
||||||
foreach (Batch batch in batches)
|
foreach (Batch batch in batches)
|
||||||
{
|
{
|
||||||
if (batch.domain != domain && batch.method != operation)
|
if (batch.domain != domain || batch.method != operation)
|
||||||
{
|
{
|
||||||
temp.Add(batch);
|
temp.Add(batch);
|
||||||
}
|
}
|
||||||
@@ -620,7 +619,7 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
else if (b.method == "UPDATE")
|
else if (b.method == "UPDATE")
|
||||||
{
|
{
|
||||||
sw.WriteLine(b.domain + "," + b.method + ",[" + string.Join(", ", b.update.Select(record => record.ToString())) + "]");
|
sw.WriteLine(b.domain + "," + b.method + ",[" + string.Join(";", b.update.Select(record => record.ToString())) + "]");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -652,14 +651,54 @@ namespace FireWallet
|
|||||||
{
|
{
|
||||||
if (split[1] == "UPDATE")
|
if (split[1] == "UPDATE")
|
||||||
{
|
{
|
||||||
// Select operation and import domains
|
// Join the rest of the line
|
||||||
string[] newDomains = new string[domains.Length + 1];
|
string[] updateArray = new string[split.Length - 2];
|
||||||
for (int i = 0; i < domains.Length; i++)
|
for (int i = 0; i < updateArray.Length; i++)
|
||||||
{
|
{
|
||||||
newDomains[i] = domains[i];
|
updateArray[i] = split[i + 2];
|
||||||
}
|
}
|
||||||
newDomains[domains.Length] = split[0];
|
string updateString = string.Join(",", updateArray);
|
||||||
domains = newDomains;
|
updateString.TrimStart('[');
|
||||||
|
updateString.TrimEnd(']');
|
||||||
|
|
||||||
|
string[] updateSplit = updateString.Split(';');
|
||||||
|
DNS[] UpdateRecords = new DNS[updateSplit.Length];
|
||||||
|
int r = 0;
|
||||||
|
foreach (string update in updateSplit)
|
||||||
|
{
|
||||||
|
string[] updateRecord = update.Split(',');
|
||||||
|
string type = updateRecord[0];
|
||||||
|
type = type.Split(':')[1].Replace("\"","").Trim();
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case "NS":
|
||||||
|
string ns = updateRecord[1].Split(':')[1].Replace("\"","").Replace("}","").Trim();
|
||||||
|
UpdateRecords[r] = new DNS(type, ns);
|
||||||
|
break;
|
||||||
|
case "DS":
|
||||||
|
int keyTag = int.Parse(updateRecord[1].Split(':')[1]);
|
||||||
|
int algorithm = int.Parse(updateRecord[2].Split(':')[1]);
|
||||||
|
int digestType = int.Parse(updateRecord[3].Split(':')[1]);
|
||||||
|
string digest = updateRecord[4].Split(':')[1].Replace("\"", "").Replace("}", "");
|
||||||
|
|
||||||
|
UpdateRecords[r] = new DNS(type, keyTag, algorithm, digestType, digest);
|
||||||
|
break;
|
||||||
|
case "TXT":
|
||||||
|
string txt = updateRecord[1].Split(':')[1].Replace("\"", "").Replace("}", "");
|
||||||
|
txt = txt.Replace("[", "");
|
||||||
|
txt = txt.Replace("]", "");
|
||||||
|
UpdateRecords[r] = new DNS(type, new string[] { txt.Trim() });
|
||||||
|
break;
|
||||||
|
case "GLUE4":
|
||||||
|
case "GLUE6":
|
||||||
|
string nsGlue = updateRecord[1].Split(':')[1].Replace("\"", "").Trim();
|
||||||
|
string address = updateRecord[2].Split(':')[1].Replace("\"", "").Replace("}", "").Trim();
|
||||||
|
UpdateRecords[r] = new DNS(type, nsGlue, address);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
r++;
|
||||||
|
}
|
||||||
|
AddBatch(split[0], split[1], UpdateRecords);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -712,6 +751,10 @@ namespace FireWallet
|
|||||||
{
|
{
|
||||||
AddBatch(b.domain, b.method, b.toAddress);
|
AddBatch(b.domain, b.method, b.toAddress);
|
||||||
}
|
}
|
||||||
|
else if (b.method == "UPDATE")
|
||||||
|
{
|
||||||
|
AddBatch(b.domain, b.method, b.update);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddBatch(b.domain, b.method);
|
AddBatch(b.domain, b.method);
|
||||||
@@ -754,22 +797,27 @@ namespace FireWallet
|
|||||||
req.Content = new StringContent(content);
|
req.Content = new StringContent(content);
|
||||||
|
|
||||||
// Send request
|
// Send request
|
||||||
HttpResponseMessage resp = await httpClient.SendAsync(req);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
resp.EnsureSuccessStatusCode();
|
HttpResponseMessage resp = await httpClient.SendAsync(req);
|
||||||
}
|
if (resp.StatusCode != HttpStatusCode.OK)
|
||||||
catch (Exception ex)
|
|
||||||
{
|
{
|
||||||
AddLog("Post Error: " + ex.Message);
|
AddLog("Post Error: " + resp.StatusCode.ToString());
|
||||||
AddLog(await resp.Content.ReadAsStringAsync());
|
AddLog(await resp.Content.ReadAsStringAsync());
|
||||||
AddLog(content);
|
AddLog(content);
|
||||||
return "Error";
|
return "Error";
|
||||||
}
|
}
|
||||||
|
|
||||||
return await resp.Content.ReadAsStringAsync();
|
return await resp.Content.ReadAsStringAsync();
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
AddLog("Post Error: " + ex.Message);
|
||||||
|
return "Error";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class Batch
|
public class Batch
|
||||||
{
|
{
|
||||||
@@ -830,6 +878,10 @@ namespace FireWallet
|
|||||||
return "[\"UPDATE\", \"" + domain + "\", " + records + "]";
|
return "[\"UPDATE\", \"" + domain + "\", " + records + "]";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (method == "UPDATE")
|
||||||
|
{
|
||||||
|
return "[\"UPDATE\", \"" + domain + "\", {\"records\":[]}]";
|
||||||
|
}
|
||||||
return "[\"" + method + "\", \"" + domain + "\"]";
|
return "[\"" + method + "\", \"" + domain + "\"]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
FireWallet/BatchImportForm.Designer.cs
generated
2
FireWallet/BatchImportForm.Designer.cs
generated
@@ -72,7 +72,7 @@
|
|||||||
comboBoxMode.FlatStyle = FlatStyle.Flat;
|
comboBoxMode.FlatStyle = FlatStyle.Flat;
|
||||||
comboBoxMode.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
comboBoxMode.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
comboBoxMode.FormattingEnabled = true;
|
comboBoxMode.FormattingEnabled = true;
|
||||||
comboBoxMode.Items.AddRange(new object[] { "OPEN", "BID", "REVEAL", "REDEEM", "RENEW", "TRANSFER", "FINALIZE", "CANCEL" });
|
comboBoxMode.Items.AddRange(new object[] { "OPEN", "BID", "REVEAL", "REDEEM", "REGISTER", "RENEW", "TRANSFER", "FINALIZE", "CANCEL" });
|
||||||
comboBoxMode.Location = new Point(346, 42);
|
comboBoxMode.Location = new Point(346, 42);
|
||||||
comboBoxMode.Name = "comboBoxMode";
|
comboBoxMode.Name = "comboBoxMode";
|
||||||
comboBoxMode.Size = new Size(226, 29);
|
comboBoxMode.Size = new Size(226, 29);
|
||||||
|
|||||||
@@ -263,6 +263,21 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
else if (comboBoxMode.Text == "REGISTER")
|
||||||
|
{
|
||||||
|
batches = new Batch[0];
|
||||||
|
foreach (string domain in listBoxDomains.Items)
|
||||||
|
{
|
||||||
|
if (domain != "")
|
||||||
|
{
|
||||||
|
Batch[] newBatch = new Batch[batches.Length + 1];
|
||||||
|
Array.Copy(batches, newBatch, batches.Length);
|
||||||
|
newBatch[newBatch.Length - 1] = new Batch(domain,"UPDATE",new DNS[0]);
|
||||||
|
batches = newBatch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
else if (comboBoxMode.Text == "TRANSFER")
|
else if (comboBoxMode.Text == "TRANSFER")
|
||||||
{
|
{
|
||||||
batches = new Batch[0];
|
batches = new Batch[0];
|
||||||
|
|||||||
@@ -363,6 +363,12 @@ namespace FireWallet
|
|||||||
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
|
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
|
||||||
string responseDNS = await APIPost("", false, contentDNS);
|
string responseDNS = await APIPost("", false, contentDNS);
|
||||||
JObject jObjectDNS = JObject.Parse(responseDNS);
|
JObject jObjectDNS = JObject.Parse(responseDNS);
|
||||||
|
|
||||||
|
if (jObjectDNS["result"].ToString() == "")
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
JObject result = (JObject)jObjectDNS["result"];
|
JObject result = (JObject)jObjectDNS["result"];
|
||||||
JArray records = (JArray)result["records"];
|
JArray records = (JArray)result["records"];
|
||||||
// For each record
|
// For each record
|
||||||
|
|||||||
@@ -279,6 +279,14 @@ namespace FireWallet
|
|||||||
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
|
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
|
||||||
string responseDNS = await APIPost("", false, contentDNS);
|
string responseDNS = await APIPost("", false, contentDNS);
|
||||||
JObject jObjectDNS = JObject.Parse(responseDNS);
|
JObject jObjectDNS = JObject.Parse(responseDNS);
|
||||||
|
|
||||||
|
if (jObjectDNS["result"].ToString() == "")
|
||||||
|
{
|
||||||
|
// Not registered
|
||||||
|
groupBoxDNS.Visible = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
JObject result = (JObject)jObjectDNS["result"];
|
JObject result = (JObject)jObjectDNS["result"];
|
||||||
JArray records = (JArray)result["records"];
|
JArray records = (JArray)result["records"];
|
||||||
// For each record
|
// For each record
|
||||||
@@ -814,7 +822,14 @@ namespace FireWallet
|
|||||||
|
|
||||||
if (!DNSEdit.cancel)
|
if (!DNSEdit.cancel)
|
||||||
{
|
{
|
||||||
string records = string.Join(", ", DNSEdit.DNSrecords.Select(record => record.ToString()));
|
string records = "";
|
||||||
|
if (DNSEdit.DNSrecords != null)
|
||||||
|
{
|
||||||
|
if (DNSEdit.DNSrecords.Count() > 0)
|
||||||
|
{
|
||||||
|
records = string.Join(", ", DNSEdit.DNSrecords.Select(record => record.ToString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string content = "{\"method\": \"sendupdate\", \"params\": [\"" + domain + "\", {\"records\": [" + records + "]}]}";
|
string content = "{\"method\": \"sendupdate\", \"params\": [\"" + domain + "\", {\"records\": [" + records + "]}]}";
|
||||||
string response = await APIPost("", true, content);
|
string response = await APIPost("", true, content);
|
||||||
|
|||||||
BIN
FireWallet/FW.ico
Normal file
BIN
FireWallet/FW.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -6,17 +6,17 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ApplicationIcon>FW2.ico</ApplicationIcon>
|
<ApplicationIcon>FW.ico</ApplicationIcon>
|
||||||
<Title>FireWallet</Title>
|
<Title>FireWallet</Title>
|
||||||
<PackageProjectUrl>https://l.woodburn.au</PackageProjectUrl>
|
<PackageProjectUrl>https://l.woodburn.au</PackageProjectUrl>
|
||||||
<PackageIcon>HSDBatcher.png</PackageIcon>
|
<PackageIcon>HSDBatcher.png</PackageIcon>
|
||||||
<RepositoryUrl>https://github.com/Nathanwoodburn/FireWallet</RepositoryUrl>
|
<RepositoryUrl>https://github.com/Nathanwoodburn/FireWallet</RepositoryUrl>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<Version>3.2</Version>
|
<Version>3.3</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="FW2.ico" />
|
<Content Include="FW.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
63
FireWallet/MainForm.Designer.cs
generated
63
FireWallet/MainForm.Designer.cs
generated
@@ -45,6 +45,8 @@ namespace FireWallet
|
|||||||
githubToolStripMenuItem = new ToolStripMenuItem();
|
githubToolStripMenuItem = new ToolStripMenuItem();
|
||||||
websiteToolStripMenuItem = new ToolStripMenuItem();
|
websiteToolStripMenuItem = new ToolStripMenuItem();
|
||||||
supportDiscordServerToolStripMenuItem = new ToolStripMenuItem();
|
supportDiscordServerToolStripMenuItem = new ToolStripMenuItem();
|
||||||
|
toolStripSeparator1 = new ToolStripSeparator();
|
||||||
|
otherProjectsToolStripMenuItem = new ToolStripMenuItem();
|
||||||
timerNodeStatus = new System.Windows.Forms.Timer(components);
|
timerNodeStatus = new System.Windows.Forms.Timer(components);
|
||||||
panelaccount = new Panel();
|
panelaccount = new Panel();
|
||||||
groupBoxaccount = new GroupBox();
|
groupBoxaccount = new GroupBox();
|
||||||
@@ -63,6 +65,7 @@ namespace FireWallet
|
|||||||
buttonNavSend = new Button();
|
buttonNavSend = new Button();
|
||||||
buttonNavPortfolio = new Button();
|
buttonNavPortfolio = new Button();
|
||||||
panelPortfolio = new Panel();
|
panelPortfolio = new Panel();
|
||||||
|
buttonRedeemAll = new Button();
|
||||||
buttonRevealAll = new Button();
|
buttonRevealAll = new Button();
|
||||||
groupBoxTransactions = new GroupBox();
|
groupBoxTransactions = new GroupBox();
|
||||||
groupBoxinfo = new GroupBox();
|
groupBoxinfo = new GroupBox();
|
||||||
@@ -124,8 +127,7 @@ namespace FireWallet
|
|||||||
textBoxExAddr = new TextBox();
|
textBoxExAddr = new TextBox();
|
||||||
labelSettings4 = new Label();
|
labelSettings4 = new Label();
|
||||||
textBoxExTX = new TextBox();
|
textBoxExTX = new TextBox();
|
||||||
toolStripSeparator1 = new ToolStripSeparator();
|
buttonSendAll = new Button();
|
||||||
otherProjectsToolStripMenuItem = new ToolStripMenuItem();
|
|
||||||
statusStripmain.SuspendLayout();
|
statusStripmain.SuspendLayout();
|
||||||
panelaccount.SuspendLayout();
|
panelaccount.SuspendLayout();
|
||||||
groupBoxaccount.SuspendLayout();
|
groupBoxaccount.SuspendLayout();
|
||||||
@@ -233,6 +235,18 @@ namespace FireWallet
|
|||||||
supportDiscordServerToolStripMenuItem.Text = "Support Discord Server";
|
supportDiscordServerToolStripMenuItem.Text = "Support Discord Server";
|
||||||
supportDiscordServerToolStripMenuItem.Click += supportDiscordServerToolStripMenuItem_Click;
|
supportDiscordServerToolStripMenuItem.Click += supportDiscordServerToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
|
// toolStripSeparator1
|
||||||
|
//
|
||||||
|
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
|
toolStripSeparator1.Size = new Size(191, 6);
|
||||||
|
//
|
||||||
|
// otherProjectsToolStripMenuItem
|
||||||
|
//
|
||||||
|
otherProjectsToolStripMenuItem.Name = "otherProjectsToolStripMenuItem";
|
||||||
|
otherProjectsToolStripMenuItem.Size = new Size(194, 22);
|
||||||
|
otherProjectsToolStripMenuItem.Text = "Other Projects";
|
||||||
|
otherProjectsToolStripMenuItem.Click += otherProjectsToolStripMenuItem_Click;
|
||||||
|
//
|
||||||
// timerNodeStatus
|
// timerNodeStatus
|
||||||
//
|
//
|
||||||
timerNodeStatus.Enabled = true;
|
timerNodeStatus.Enabled = true;
|
||||||
@@ -433,23 +447,37 @@ namespace FireWallet
|
|||||||
//
|
//
|
||||||
// panelPortfolio
|
// panelPortfolio
|
||||||
//
|
//
|
||||||
|
panelPortfolio.Controls.Add(buttonSendAll);
|
||||||
|
panelPortfolio.Controls.Add(buttonRedeemAll);
|
||||||
panelPortfolio.Controls.Add(buttonRevealAll);
|
panelPortfolio.Controls.Add(buttonRevealAll);
|
||||||
panelPortfolio.Controls.Add(groupBoxTransactions);
|
panelPortfolio.Controls.Add(groupBoxTransactions);
|
||||||
panelPortfolio.Controls.Add(groupBoxinfo);
|
panelPortfolio.Controls.Add(groupBoxinfo);
|
||||||
panelPortfolio.Controls.Add(groupBoxbalance);
|
panelPortfolio.Controls.Add(groupBoxbalance);
|
||||||
panelPortfolio.Location = new Point(1065, 80);
|
panelPortfolio.Location = new Point(140, 35);
|
||||||
panelPortfolio.Name = "panelPortfolio";
|
panelPortfolio.Name = "panelPortfolio";
|
||||||
panelPortfolio.Size = new Size(956, 538);
|
panelPortfolio.Size = new Size(956, 538);
|
||||||
panelPortfolio.TabIndex = 7;
|
panelPortfolio.TabIndex = 7;
|
||||||
panelPortfolio.Visible = false;
|
panelPortfolio.Visible = false;
|
||||||
//
|
//
|
||||||
|
// buttonRedeemAll
|
||||||
|
//
|
||||||
|
buttonRedeemAll.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonRedeemAll.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
|
buttonRedeemAll.Location = new Point(649, 12);
|
||||||
|
buttonRedeemAll.Name = "buttonRedeemAll";
|
||||||
|
buttonRedeemAll.Size = new Size(106, 44);
|
||||||
|
buttonRedeemAll.TabIndex = 9;
|
||||||
|
buttonRedeemAll.Text = "Redeem All";
|
||||||
|
buttonRedeemAll.UseVisualStyleBackColor = true;
|
||||||
|
buttonRedeemAll.Click += buttonRedeemAll_Click;
|
||||||
|
//
|
||||||
// buttonRevealAll
|
// buttonRevealAll
|
||||||
//
|
//
|
||||||
buttonRevealAll.FlatStyle = FlatStyle.Flat;
|
buttonRevealAll.FlatStyle = FlatStyle.Flat;
|
||||||
buttonRevealAll.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
buttonRevealAll.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
buttonRevealAll.Location = new Point(537, 12);
|
buttonRevealAll.Location = new Point(537, 12);
|
||||||
buttonRevealAll.Name = "buttonRevealAll";
|
buttonRevealAll.Name = "buttonRevealAll";
|
||||||
buttonRevealAll.Size = new Size(89, 44);
|
buttonRevealAll.Size = new Size(106, 44);
|
||||||
buttonRevealAll.TabIndex = 9;
|
buttonRevealAll.TabIndex = 9;
|
||||||
buttonRevealAll.Text = "Reveal All";
|
buttonRevealAll.Text = "Reveal All";
|
||||||
buttonRevealAll.UseVisualStyleBackColor = true;
|
buttonRevealAll.UseVisualStyleBackColor = true;
|
||||||
@@ -576,7 +604,7 @@ namespace FireWallet
|
|||||||
panelSend.Controls.Add(labelSendingTo);
|
panelSend.Controls.Add(labelSendingTo);
|
||||||
panelSend.Controls.Add(labelSendPrompt);
|
panelSend.Controls.Add(labelSendPrompt);
|
||||||
panelSend.Controls.Add(labelHIPArrow);
|
panelSend.Controls.Add(labelHIPArrow);
|
||||||
panelSend.Location = new Point(138, 33);
|
panelSend.Location = new Point(1041, 235);
|
||||||
panelSend.Name = "panelSend";
|
panelSend.Name = "panelSend";
|
||||||
panelSend.Size = new Size(974, 521);
|
panelSend.Size = new Size(974, 521);
|
||||||
panelSend.TabIndex = 2;
|
panelSend.TabIndex = 2;
|
||||||
@@ -794,7 +822,7 @@ namespace FireWallet
|
|||||||
panelDomains.Controls.Add(groupBoxDomains);
|
panelDomains.Controls.Add(groupBoxDomains);
|
||||||
panelDomains.Controls.Add(labelDomainSearch);
|
panelDomains.Controls.Add(labelDomainSearch);
|
||||||
panelDomains.Controls.Add(textBoxDomainSearch);
|
panelDomains.Controls.Add(textBoxDomainSearch);
|
||||||
panelDomains.Location = new Point(120, 48);
|
panelDomains.Location = new Point(1122, 35);
|
||||||
panelDomains.Name = "panelDomains";
|
panelDomains.Name = "panelDomains";
|
||||||
panelDomains.Size = new Size(920, 536);
|
panelDomains.Size = new Size(920, 536);
|
||||||
panelDomains.TabIndex = 18;
|
panelDomains.TabIndex = 18;
|
||||||
@@ -1093,17 +1121,17 @@ namespace FireWallet
|
|||||||
textBoxExTX.Size = new Size(307, 29);
|
textBoxExTX.Size = new Size(307, 29);
|
||||||
textBoxExTX.TabIndex = 1;
|
textBoxExTX.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// toolStripSeparator1
|
// buttonSendAll
|
||||||
//
|
//
|
||||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
buttonSendAll.FlatStyle = FlatStyle.Flat;
|
||||||
toolStripSeparator1.Size = new Size(191, 6);
|
buttonSendAll.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||||
//
|
buttonSendAll.Location = new Point(761, 12);
|
||||||
// otherProjectsToolStripMenuItem
|
buttonSendAll.Name = "buttonSendAll";
|
||||||
//
|
buttonSendAll.Size = new Size(106, 44);
|
||||||
otherProjectsToolStripMenuItem.Name = "otherProjectsToolStripMenuItem";
|
buttonSendAll.TabIndex = 9;
|
||||||
otherProjectsToolStripMenuItem.Size = new Size(194, 22);
|
buttonSendAll.Text = "Send All TXs";
|
||||||
otherProjectsToolStripMenuItem.Text = "Other Projects";
|
buttonSendAll.UseVisualStyleBackColor = true;
|
||||||
otherProjectsToolStripMenuItem.Click += otherProjectsToolStripMenuItem_Click;
|
buttonSendAll.Click += buttonSendAll_Click;
|
||||||
//
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
@@ -1124,6 +1152,7 @@ namespace FireWallet
|
|||||||
Text = "FireWallet";
|
Text = "FireWallet";
|
||||||
FormClosing += MainForm_Closing;
|
FormClosing += MainForm_Closing;
|
||||||
Load += MainForm_Load;
|
Load += MainForm_Load;
|
||||||
|
ResizeEnd += MainForm_ResizeEnd;
|
||||||
Resize += Form1_Resize;
|
Resize += Form1_Resize;
|
||||||
statusStripmain.ResumeLayout(false);
|
statusStripmain.ResumeLayout(false);
|
||||||
statusStripmain.PerformLayout();
|
statusStripmain.PerformLayout();
|
||||||
@@ -1250,5 +1279,7 @@ namespace FireWallet
|
|||||||
private Label labelDomainSort;
|
private Label labelDomainSort;
|
||||||
private ToolStripSeparator toolStripSeparator1;
|
private ToolStripSeparator toolStripSeparator1;
|
||||||
private ToolStripMenuItem otherProjectsToolStripMenuItem;
|
private ToolStripMenuItem otherProjectsToolStripMenuItem;
|
||||||
|
private Button buttonRedeemAll;
|
||||||
|
private Button buttonSendAll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,8 +7,6 @@ using QRCoder;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Security.Policy;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using DnsClient;
|
using DnsClient;
|
||||||
using DnsClient.Protocol;
|
using DnsClient.Protocol;
|
||||||
@@ -130,7 +128,7 @@ namespace FireWallet
|
|||||||
// Wait until the Node is connected before closing the splash
|
// Wait until the Node is connected before closing the splash
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
string status = await APIGet("",false);
|
string status = await APIGet("", false);
|
||||||
if (status != "Error")
|
if (status != "Error")
|
||||||
{
|
{
|
||||||
ss.CloseSplash();
|
ss.CloseSplash();
|
||||||
@@ -144,13 +142,20 @@ namespace FireWallet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
|
|
||||||
|
while (!ss.IsClosed)
|
||||||
|
{
|
||||||
|
Thread.Sleep(100);
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
AddLog("Loaded");
|
AddLog("Loaded");
|
||||||
|
|
||||||
|
|
||||||
// Pull form to front
|
// Pull form to front
|
||||||
Opacity = 1;
|
|
||||||
this.WindowState = FormWindowState.Minimized;
|
this.WindowState = FormWindowState.Minimized;
|
||||||
this.Show();
|
this.Show();
|
||||||
|
this.Opacity = 1;
|
||||||
this.WindowState = FormWindowState.Normal;
|
this.WindowState = FormWindowState.Normal;
|
||||||
textBoxaccountpassword.Focus();
|
textBoxaccountpassword.Focus();
|
||||||
}
|
}
|
||||||
@@ -622,6 +627,10 @@ namespace FireWallet
|
|||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
|
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
|
||||||
}
|
}
|
||||||
|
private void MainForm_ResizeEnd(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ResizeForm();
|
||||||
|
}
|
||||||
private void Form1_Resize(object sender, EventArgs e)
|
private void Form1_Resize(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ResizeForm();
|
ResizeForm();
|
||||||
@@ -633,9 +642,33 @@ namespace FireWallet
|
|||||||
groupBoxDomains.Width = panelDomains.Width - 20;
|
groupBoxDomains.Width = panelDomains.Width - 20;
|
||||||
groupBoxDomains.Left = 10;
|
groupBoxDomains.Left = 10;
|
||||||
groupBoxDomains.Height = panelDomains.Height - groupBoxDomains.Top - 10;
|
groupBoxDomains.Height = panelDomains.Height - groupBoxDomains.Top - 10;
|
||||||
|
|
||||||
buttonNavSettings.Top = panelNav.Height - buttonNavSettings.Height - 10;
|
buttonNavSettings.Top = panelNav.Height - buttonNavSettings.Height - 10;
|
||||||
buttonSettingsSave.Top = panelSettings.Height - buttonSettingsSave.Height - 10;
|
buttonSettingsSave.Top = panelSettings.Height - buttonSettingsSave.Height - 10;
|
||||||
|
groupBoxTransactions.Height = panelPortfolio.Height - groupBoxbalance.Height - 10;
|
||||||
|
|
||||||
|
// SEND Page
|
||||||
|
labelSendPrompt.Left = (panelSend.Width - labelSendPrompt.Width) / 2;
|
||||||
|
buttonSendHNS.Left = (panelSend.Width - buttonSendHNS.Width) / 2;
|
||||||
|
labelSendingTo.Left = (panelSend.Width - labelSendingTo.Width - textBoxSendingTo.Width) / 2;
|
||||||
|
labelSendingAmount.Left = labelSendingTo.Left;
|
||||||
|
textBoxSendingTo.Left = labelSendingTo.Left + labelSendingTo.Width + 10;
|
||||||
|
textBoxSendingAmount.Left = textBoxSendingTo.Left;
|
||||||
|
labelSendingMax.Left = labelSendingTo.Left;
|
||||||
|
labelSendingError.Left = textBoxSendingTo.Left + textBoxSendingTo.Width + 10;
|
||||||
|
labelSendingFee.Left = labelSendingTo.Left;
|
||||||
|
buttonSendMax.Left = textBoxSendingAmount.Left + textBoxSendingAmount.Width - buttonSendMax.Width;
|
||||||
|
checkBoxSendSubFee.Left = labelSendingTo.Left;
|
||||||
|
|
||||||
|
// RECEIVE Page
|
||||||
|
labelReceive1.Left = (panelRecieve.Width - labelReceive1.Width) / 2;
|
||||||
|
labelReceive2.Left = (panelRecieve.Width - labelReceive2.Width) / 2;
|
||||||
|
textBoxReceiveAddress.Left = (panelRecieve.Width - textBoxReceiveAddress.Width) / 2;
|
||||||
|
Size size = TextRenderer.MeasureText(textBoxReceiveAddress.Text, textBoxReceiveAddress.Font);
|
||||||
|
textBoxReceiveAddress.Width = size.Width + 10;
|
||||||
|
textBoxReceiveAddress.Left = (panelRecieve.Width - textBoxReceiveAddress.Width) / 2;
|
||||||
|
pictureBoxReceiveQR.Width = panelRecieve.Width / 3;
|
||||||
|
pictureBoxReceiveQR.Left = (panelRecieve.Width - pictureBoxReceiveQR.Width) / 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region Accounts
|
#region Accounts
|
||||||
@@ -894,21 +927,25 @@ namespace FireWallet
|
|||||||
req.Content = new StringContent(content);
|
req.Content = new StringContent(content);
|
||||||
|
|
||||||
// Send request
|
// Send request
|
||||||
HttpResponseMessage resp = await httpClient.SendAsync(req);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
resp.EnsureSuccessStatusCode();
|
HttpResponseMessage resp = await httpClient.SendAsync(req);
|
||||||
|
if (!resp.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
AddLog("Post Error: " + resp.StatusCode);
|
||||||
|
AddLog(await resp.Content.ReadAsStringAsync());
|
||||||
|
return "Error";
|
||||||
|
}
|
||||||
|
return await resp.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
AddLog("Post Error: " + ex.Message);
|
AddLog("Post Error: " + ex.Message);
|
||||||
AddLog(await resp.Content.ReadAsStringAsync());
|
|
||||||
AddLog("Content: " + content);
|
|
||||||
return "Error";
|
return "Error";
|
||||||
}
|
}
|
||||||
|
|
||||||
return await resp.Content.ReadAsStringAsync();
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get from HSD API
|
/// Get from HSD API
|
||||||
@@ -938,7 +975,12 @@ namespace FireWallet
|
|||||||
request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes("x:" + key)));
|
request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes("x:" + key)));
|
||||||
// Send request and log response
|
// Send request and log response
|
||||||
HttpResponseMessage response = await httpClient.SendAsync(request);
|
HttpResponseMessage response = await httpClient.SendAsync(request);
|
||||||
response.EnsureSuccessStatusCode();
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
AddLog("Get Error: " + response.StatusCode);
|
||||||
|
AddLog(await response.Content.ReadAsStringAsync());
|
||||||
|
return "Error";
|
||||||
|
}
|
||||||
return await response.Content.ReadAsStringAsync();
|
return await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -959,9 +1001,16 @@ namespace FireWallet
|
|||||||
AddLog("GetAddress Error");
|
AddLog("GetAddress Error");
|
||||||
return "Error";
|
return "Error";
|
||||||
}
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
JObject resp = JObject.Parse(APIresponse);
|
JObject resp = JObject.Parse(APIresponse);
|
||||||
return resp["address"].ToString();
|
return resp["address"].ToString();
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return "Error";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async void GetTXHistory()
|
private async void GetTXHistory()
|
||||||
{
|
{
|
||||||
@@ -1195,6 +1244,7 @@ namespace FireWallet
|
|||||||
buttonNavPortfolio.BackColor = ColorTranslator.FromHtml(Theme["selected-bg"]);
|
buttonNavPortfolio.BackColor = ColorTranslator.FromHtml(Theme["selected-bg"]);
|
||||||
buttonNavPortfolio.ForeColor = ColorTranslator.FromHtml(Theme["selected-fg"]);
|
buttonNavPortfolio.ForeColor = ColorTranslator.FromHtml(Theme["selected-fg"]);
|
||||||
}
|
}
|
||||||
|
groupBoxTransactions.Height = panelPortfolio.Height - groupBoxbalance.Height - 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SendPanel_Click(object sender, EventArgs e)
|
private async void SendPanel_Click(object sender, EventArgs e)
|
||||||
@@ -1260,9 +1310,6 @@ namespace FireWallet
|
|||||||
pictureBoxReceiveQR.SizeMode = PictureBoxSizeMode.Zoom;
|
pictureBoxReceiveQR.SizeMode = PictureBoxSizeMode.Zoom;
|
||||||
pictureBoxReceiveQR.Width = panelRecieve.Width / 3;
|
pictureBoxReceiveQR.Width = panelRecieve.Width / 3;
|
||||||
pictureBoxReceiveQR.Left = (panelRecieve.Width - pictureBoxReceiveQR.Width) / 2;
|
pictureBoxReceiveQR.Left = (panelRecieve.Width - pictureBoxReceiveQR.Width) / 2;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
private void buttonNavDomains_Click(object sender, EventArgs e)
|
private void buttonNavDomains_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -1355,7 +1402,8 @@ namespace FireWallet
|
|||||||
if (UserSettings.ContainsKey("hip-02-port"))
|
if (UserSettings.ContainsKey("hip-02-port"))
|
||||||
{
|
{
|
||||||
port = int.Parse(UserSettings["hip-02-port"]);
|
port = int.Parse(UserSettings["hip-02-port"]);
|
||||||
} else if (!HSD)
|
}
|
||||||
|
else if (!HSD)
|
||||||
{
|
{
|
||||||
string bobPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Bob\\hsd_data";
|
string bobPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Bob\\hsd_data";
|
||||||
if (Directory.Exists(bobPath))
|
if (Directory.Exists(bobPath))
|
||||||
@@ -1436,7 +1484,7 @@ namespace FireWallet
|
|||||||
{
|
{
|
||||||
labelSendingError.Show();
|
labelSendingError.Show();
|
||||||
labelSendingError.Text = "Invalid Address";
|
labelSendingError.Text = "Invalid Address";
|
||||||
AddLog("Invalid Address\n"+address);
|
AddLog("Invalid Address\n" + address);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1570,8 +1618,6 @@ namespace FireWallet
|
|||||||
|
|
||||||
if (!WatchOnly)
|
if (!WatchOnly)
|
||||||
{
|
{
|
||||||
|
|
||||||
AddLog("Sending " + amount.ToString() + " HNS to " + address);
|
|
||||||
string content = "{\"method\": \"sendtoaddress\",\"params\": [ \"" + address + "\", " +
|
string content = "{\"method\": \"sendtoaddress\",\"params\": [ \"" + address + "\", " +
|
||||||
amount.ToString() + ", \"\", \"\", " + subtractFee + " ]}";
|
amount.ToString() + ", \"\", \"\", " + subtractFee + " ]}";
|
||||||
string output = await APIPost("", true, content);
|
string output = await APIPost("", true, content);
|
||||||
@@ -2289,7 +2335,6 @@ namespace FireWallet
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Help Menu
|
#region Help Menu
|
||||||
private void githubToolStripMenuItem_Click(object sender, EventArgs e)
|
private void githubToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -2331,5 +2376,83 @@ namespace FireWallet
|
|||||||
Process.Start(psi);
|
Process.Start(psi);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private async void buttonRedeemAll_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonRedeemAll.Enabled = false;
|
||||||
|
string content = "{\"method\": \"sendbatch\", \"params\":[[[\"REDEEM\"]]]}";
|
||||||
|
AddLog(content);
|
||||||
|
string response = await APIPost("", true, content);
|
||||||
|
if (response == "Error")
|
||||||
|
{
|
||||||
|
AddLog("Error sending batch");
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Error sending batch");
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
buttonRedeemAll.Enabled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
JObject resp = JObject.Parse(response);
|
||||||
|
if (resp["error"].ToString() != "")
|
||||||
|
{
|
||||||
|
AddLog("Error sending batch");
|
||||||
|
AddLog(resp["error"].ToString());
|
||||||
|
JObject error = JObject.Parse(resp["error"].ToString());
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Error sending batch\n" + error["message"].ToString());
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
buttonRedeemAll.Enabled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (resp.ContainsKey("result"))
|
||||||
|
{
|
||||||
|
JObject result = JObject.Parse(resp["result"].ToString());
|
||||||
|
string hash = result["hash"].ToString();
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Batch sent\n" + hash, "Explorer", UserSettings["explorer-tx"] + hash);
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
}
|
||||||
|
buttonRedeemAll.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void buttonSendAll_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonSendAll.Enabled = false;
|
||||||
|
string content = "{\"method\": \"sendbatch\", \"params\":[[[\"REVEAL\"],[\"REDEEM\"],[\"RENEW\"]]]}";
|
||||||
|
AddLog(content);
|
||||||
|
string response = await APIPost("", true, content);
|
||||||
|
if (response == "Error")
|
||||||
|
{
|
||||||
|
AddLog("Error sending batch");
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Error sending batch");
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
buttonSendAll.Enabled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
JObject resp = JObject.Parse(response);
|
||||||
|
if (resp["error"].ToString() != "")
|
||||||
|
{
|
||||||
|
AddLog("Error sending batch");
|
||||||
|
AddLog(resp["error"].ToString());
|
||||||
|
JObject error = JObject.Parse(resp["error"].ToString());
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Error sending batch\n" + error["message"].ToString());
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
buttonSendAll.Enabled = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (resp.ContainsKey("result"))
|
||||||
|
{
|
||||||
|
JObject result = JObject.Parse(resp["result"].ToString());
|
||||||
|
string hash = result["hash"].ToString();
|
||||||
|
NotifyForm notifyForm = new NotifyForm("Batch sent\n" + hash, "Explorer", UserSettings["explorer-tx"] + hash);
|
||||||
|
notifyForm.ShowDialog();
|
||||||
|
notifyForm.Dispose();
|
||||||
|
}
|
||||||
|
buttonSendAll.Enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
10
FireWallet/Properties/Resources.Designer.cs
generated
10
FireWallet/Properties/Resources.Designer.cs
generated
@@ -59,5 +59,15 @@ namespace FireWallet.Properties {
|
|||||||
resourceCulture = value;
|
resourceCulture = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
|
/// </summary>
|
||||||
|
internal static System.Drawing.Bitmap FWSplash {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("FWSplash", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,4 +117,8 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="FWSplash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\FWSplash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
BIN
FireWallet/Resources/FWSplash.png
Normal file
BIN
FireWallet/Resources/FWSplash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
50
FireWallet/SplashScreen.Designer.cs
generated
50
FireWallet/SplashScreen.Designer.cs
generated
@@ -28,11 +28,18 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SplashScreen));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SplashScreen));
|
||||||
label1 = new Label();
|
label1 = new Label();
|
||||||
pictureBox1 = new PictureBox();
|
pictureBox1 = new PictureBox();
|
||||||
label2 = new Label();
|
label2 = new Label();
|
||||||
|
panelNew = new Panel();
|
||||||
|
pictureBoxNew = new PictureBox();
|
||||||
|
timerIn = new System.Windows.Forms.Timer(components);
|
||||||
|
timerOut = new System.Windows.Forms.Timer(components);
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||||
|
panelNew.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBoxNew).BeginInit();
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
@@ -67,12 +74,45 @@
|
|||||||
label2.Text = "Nathan.Woodburn/";
|
label2.Text = "Nathan.Woodburn/";
|
||||||
label2.Click += label2_Click;
|
label2.Click += label2_Click;
|
||||||
//
|
//
|
||||||
|
// panelNew
|
||||||
|
//
|
||||||
|
panelNew.Controls.Add(pictureBoxNew);
|
||||||
|
panelNew.Dock = DockStyle.Fill;
|
||||||
|
panelNew.Location = new Point(0, 0);
|
||||||
|
panelNew.Name = "panelNew";
|
||||||
|
panelNew.Size = new Size(450, 450);
|
||||||
|
panelNew.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// pictureBoxNew
|
||||||
|
//
|
||||||
|
pictureBoxNew.BackColor = Color.Black;
|
||||||
|
pictureBoxNew.Dock = DockStyle.Fill;
|
||||||
|
pictureBoxNew.Image = Properties.Resources.FWSplash;
|
||||||
|
pictureBoxNew.InitialImage = null;
|
||||||
|
pictureBoxNew.Location = new Point(0, 0);
|
||||||
|
pictureBoxNew.Name = "pictureBoxNew";
|
||||||
|
pictureBoxNew.Size = new Size(450, 450);
|
||||||
|
pictureBoxNew.SizeMode = PictureBoxSizeMode.Zoom;
|
||||||
|
pictureBoxNew.TabIndex = 0;
|
||||||
|
pictureBoxNew.TabStop = false;
|
||||||
|
pictureBoxNew.Visible = false;
|
||||||
|
//
|
||||||
|
// timerIn
|
||||||
|
//
|
||||||
|
timerIn.Enabled = true;
|
||||||
|
timerIn.Tick += timerIn_Tick;
|
||||||
|
//
|
||||||
|
// timerOut
|
||||||
|
//
|
||||||
|
timerOut.Tick += timerOut_Tick;
|
||||||
|
//
|
||||||
// SplashScreen
|
// SplashScreen
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||||
AutoScaleMode = AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
BackColor = Color.Black;
|
BackColor = Color.Black;
|
||||||
ClientSize = new Size(444, 435);
|
ClientSize = new Size(450, 450);
|
||||||
|
Controls.Add(panelNew);
|
||||||
Controls.Add(label2);
|
Controls.Add(label2);
|
||||||
Controls.Add(pictureBox1);
|
Controls.Add(pictureBox1);
|
||||||
Controls.Add(label1);
|
Controls.Add(label1);
|
||||||
@@ -83,8 +123,12 @@
|
|||||||
ShowInTaskbar = false;
|
ShowInTaskbar = false;
|
||||||
StartPosition = FormStartPosition.CenterScreen;
|
StartPosition = FormStartPosition.CenterScreen;
|
||||||
Text = "FireWallet";
|
Text = "FireWallet";
|
||||||
|
TopMost = true;
|
||||||
FormClosing += SplashScreen_FormClosing;
|
FormClosing += SplashScreen_FormClosing;
|
||||||
|
Load += SplashScreen_Load;
|
||||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||||
|
panelNew.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)pictureBoxNew).EndInit();
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -93,5 +137,9 @@
|
|||||||
private Label label1;
|
private Label label1;
|
||||||
private PictureBox pictureBox1;
|
private PictureBox pictureBox1;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
|
private Panel panelNew;
|
||||||
|
private PictureBox pictureBoxNew;
|
||||||
|
private System.Windows.Forms.Timer timerIn;
|
||||||
|
private System.Windows.Forms.Timer timerOut;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,6 @@
|
|||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Collections.Generic;
|
using System.Drawing.Imaging;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace FireWallet
|
namespace FireWallet
|
||||||
{
|
{
|
||||||
@@ -17,8 +10,10 @@ namespace FireWallet
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
close = false;
|
close = false;
|
||||||
|
IsClosed = false;
|
||||||
}
|
}
|
||||||
bool close;
|
bool close;
|
||||||
|
float opacity = 0.0f;
|
||||||
private void SplashScreen_FormClosing(object sender, FormClosingEventArgs e)
|
private void SplashScreen_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
if (!close)
|
if (!close)
|
||||||
@@ -26,12 +21,15 @@ namespace FireWallet
|
|||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool IsClosed { get; set; }
|
||||||
public void CloseSplash()
|
public void CloseSplash()
|
||||||
{
|
{
|
||||||
close = true;
|
close = true;
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Fade out
|
||||||
|
timerIn.Stop();
|
||||||
|
timerOut.Start();
|
||||||
|
}
|
||||||
private void label2_Click(object sender, EventArgs e)
|
private void label2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ProcessStartInfo psi = new ProcessStartInfo
|
ProcessStartInfo psi = new ProcessStartInfo
|
||||||
@@ -41,5 +39,56 @@ namespace FireWallet
|
|||||||
};
|
};
|
||||||
Process.Start(psi);
|
Process.Start(psi);
|
||||||
}
|
}
|
||||||
|
Bitmap splash = new Bitmap(Properties.Resources.FWSplash);
|
||||||
|
private void SplashScreen_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
pictureBoxNew.Visible = true;
|
||||||
|
this.TransparencyKey = Color.FromArgb(0, 0, 0);
|
||||||
|
pictureBoxNew.Invalidate();
|
||||||
|
}
|
||||||
|
public Image SetImageOpacity(Image image, float opacity)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Bitmap bmp = new Bitmap(image.Width, image.Height);
|
||||||
|
using (Graphics gfx = Graphics.FromImage(bmp))
|
||||||
|
{
|
||||||
|
ColorMatrix matrix = new ColorMatrix();
|
||||||
|
matrix.Matrix33 = opacity;
|
||||||
|
ImageAttributes attributes = new ImageAttributes();
|
||||||
|
attributes.SetColorMatrix(matrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
|
||||||
|
gfx.DrawImage(image, new Rectangle(0, 0, bmp.Width, bmp.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, attributes);
|
||||||
|
}
|
||||||
|
return bmp;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void timerIn_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (opacity >= 1)
|
||||||
|
{
|
||||||
|
timerIn.Stop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
opacity += 0.05f;
|
||||||
|
pictureBoxNew.Image = SetImageOpacity(splash, opacity);
|
||||||
|
pictureBoxNew.Invalidate();
|
||||||
|
}
|
||||||
|
private void timerOut_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (opacity <= 0)
|
||||||
|
{
|
||||||
|
timerOut.Stop();
|
||||||
|
IsClosed = true;
|
||||||
|
this.Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
opacity -= 0.05f;
|
||||||
|
pictureBoxNew.Image = SetImageOpacity(splash, opacity);
|
||||||
|
pictureBoxNew.Invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -898,6 +898,12 @@
|
|||||||
AAAAAAAAAAAAAADQwWbM+D8RAPjBClJL0gAAAABJRU5ErkJggg==
|
AAAAAAAAAAAAAADQwWbM+D8RAPjBClJL0gAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="timerIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="timerOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>104, 17</value>
|
||||||
|
</metadata>
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAEAAAAAAAEAIAB2pAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAOEAAADAAgGAAAAfG+p9QAAIABJ
|
AAABAAEAAAAAAAEAIAB2pAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAOEAAADAAgGAAAAfG+p9QAAIABJ
|
||||||
|
|||||||
BIN
FireWallet/favicon.ico
Normal file
BIN
FireWallet/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -224,15 +224,15 @@
|
|||||||
{
|
{
|
||||||
"Name" = "8:Microsoft Visual Studio"
|
"Name" = "8:Microsoft Visual Studio"
|
||||||
"ProductName" = "8:FireWallet"
|
"ProductName" = "8:FireWallet"
|
||||||
"ProductCode" = "8:{C4D699E7-B668-48CD-AC78-920E852B98D9}"
|
"ProductCode" = "8:{C118B90C-B5A0-4015-B03A-FB226DC02F54}"
|
||||||
"PackageCode" = "8:{38D2B4D2-E8BA-43AF-8475-F0E70AD733FE}"
|
"PackageCode" = "8:{FF49B317-BBC1-40D9-9AFF-315E3AEED79C}"
|
||||||
"UpgradeCode" = "8:{0C86F725-6B01-4173-AA05-3F0EDF481362}"
|
"UpgradeCode" = "8:{0C86F725-6B01-4173-AA05-3F0EDF481362}"
|
||||||
"AspNetVersion" = "8:"
|
"AspNetVersion" = "8:"
|
||||||
"RestartWWWService" = "11:FALSE"
|
"RestartWWWService" = "11:FALSE"
|
||||||
"RemovePreviousVersions" = "11:TRUE"
|
"RemovePreviousVersions" = "11:TRUE"
|
||||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||||
"InstallAllUsers" = "11:FALSE"
|
"InstallAllUsers" = "11:FALSE"
|
||||||
"ProductVersion" = "8:3.2"
|
"ProductVersion" = "8:3.3"
|
||||||
"Manufacturer" = "8:Nathan.Woodburn/"
|
"Manufacturer" = "8:Nathan.Woodburn/"
|
||||||
"ARPHELPTELEPHONE" = "8:"
|
"ARPHELPTELEPHONE" = "8:"
|
||||||
"ARPHELPLINK" = "8:https://l.woodburn.au/discord"
|
"ARPHELPLINK" = "8:https://l.woodburn.au/discord"
|
||||||
|
|||||||
@@ -113,9 +113,6 @@ You can add transactions to the batch from the domain window or the DNS editor.
|
|||||||
You can also import a list of domains to the batch window.
|
You can also import a list of domains to the batch window.
|
||||||
The "CANCEL" transaction type is used to cancel an transfer.
|
The "CANCEL" transaction type is used to cancel an transfer.
|
||||||
|
|
||||||
At the momemt "UPDATE" or coin only transactions are not supported.
|
|
||||||
|
|
||||||
|
|
||||||
Please not that the import syntax for BIDs is BID,LOCKUP where LOCKUP is (BID+BLIND)
|
Please not that the import syntax for BIDs is BID,LOCKUP where LOCKUP is (BID+BLIND)
|
||||||

|

|
||||||
|
|
||||||
@@ -177,3 +174,4 @@ You should check this file if you have any issues with the application.
|
|||||||
If you have any issues with the application you can open an issue on GitHub or contact me on Discord (NathanWoodburn on most Handshake servers).
|
If you have any issues with the application you can open an issue on GitHub or contact me on Discord (NathanWoodburn on most Handshake servers).
|
||||||
|
|
||||||
If you would like to support this project you can find out how at https://nathan.woodburn.au/#donate or you can help by contributing to the project on GitHub.
|
If you would like to support this project you can find out how at https://nathan.woodburn.au/#donate or you can help by contributing to the project on GitHub.
|
||||||
|
Also you can send HNS directly to `@firewallet`
|
||||||
@@ -6,4 +6,4 @@ woodburn4,BID,1,3
|
|||||||
woodburn5,BID,1,3
|
woodburn5,BID,1,3
|
||||||
woodburn6,BID,1,4
|
woodburn6,BID,1,4
|
||||||
woodburn8,TRANSFER,hs1qlmlgnx0g3ynk4ylxkkdh9c9nernclnfq4lw6s9
|
woodburn8,TRANSFER,hs1qlmlgnx0g3ynk4ylxkkdh9c9nernclnfq4lw6s9
|
||||||
exampledomainnathan118,UPDATE,[{"type": "DS","keyTag": 20167,"algorithm": 13,"digestType": 2,"digest":"4a2ab3224727a4754a6c3d77621a5b04241a3d9c7ae7e5fa17f73121b9ff0e06"}, {"type": "NS","ns": "ns1.woodburn."}, {"type": "NS","ns": "ns2.woodburn."}, {"type": "TXT","txt": ["TEST"]}]
|
exampledomainnathan90,UPDATE,[{"type": "NS","ns": "ns1.woodburn."};{"type": "NS","ns": "ns2.woodburn."};{"type": "DS","keyTag": 30273,"algorithm": 13,"digestType": 2,"digest":"9a3a8fb3d625d2a2073d740f10da6056ebed0e97f550aa7f3891ed450c7e60c9"};{"type": "GLUE4","ns": "ns1.exampledomainnathan90.","address": "1.2.3.4"};{"type": "TXT","txt": ["Test TXT record"]}]
|
||||||
Reference in New Issue
Block a user