mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2025-12-06 00:23:00 +11:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
752d20f369
|
|||
|
dc53d7eb0f
|
|||
|
3783cfe759
|
|||
|
71395f253b
|
|||
|
b34c6507b8
|
|||
|
b93c981fcd
|
@@ -804,9 +804,6 @@ namespace FireWallet
|
||||
}
|
||||
else if (state == "AVAILABLE")
|
||||
{
|
||||
decimal bid = Convert.ToDecimal(textBoxBid.Text);
|
||||
decimal blind = Convert.ToDecimal(textBoxBlind.Text);
|
||||
decimal lockup = bid + blind;
|
||||
string content = "{\"method\": \"sendopen\", \"params\": [\"" + domain + "\"]}";
|
||||
|
||||
string response = await APIPost("", true, content);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<PackageIcon>HSDBatcher.png</PackageIcon>
|
||||
<RepositoryUrl>https://github.com/Nathanwoodburn/FireWallet</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>2.4</Version>
|
||||
<Version>2.5</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.9 KiB |
@@ -189,6 +189,13 @@ namespace FireWallet
|
||||
Notifyinstall.CloseNotification();
|
||||
Notifyinstall.Dispose();
|
||||
}
|
||||
if (!Directory.Exists(dir + "hsd\\node_modules"))
|
||||
{
|
||||
AddLog("HSD install failed");
|
||||
this.Close();
|
||||
return false;
|
||||
}
|
||||
|
||||
hsdProcess = new Process();
|
||||
|
||||
bool hideScreen = true;
|
||||
@@ -203,12 +210,19 @@ namespace FireWallet
|
||||
{
|
||||
hsdProcess.StartInfo.CreateNoWindow = hideScreen;
|
||||
|
||||
if (hideScreen)
|
||||
{
|
||||
hsdProcess.StartInfo.RedirectStandardError = true;
|
||||
} else
|
||||
{
|
||||
hsdProcess.StartInfo.RedirectStandardError = false;
|
||||
}
|
||||
|
||||
hsdProcess.StartInfo.RedirectStandardInput = true;
|
||||
hsdProcess.StartInfo.RedirectStandardOutput = false;
|
||||
hsdProcess.StartInfo.UseShellExecute = false;
|
||||
hsdProcess.StartInfo.RedirectStandardError = false;
|
||||
hsdProcess.StartInfo.FileName = "node.exe";
|
||||
hsdProcess.StartInfo.Arguments = dir + "hsd/bin/hsd --index-tx --index-address --api-key " + nodeSettings["Key"];
|
||||
hsdProcess.StartInfo.Arguments = dir + "hsd/bin/hsd --agent=FireWallet --index-tx --index-address --api-key " + nodeSettings["Key"];
|
||||
|
||||
string bobPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Bob\\hsd_data";
|
||||
if (Directory.Exists(bobPath))
|
||||
@@ -218,6 +232,24 @@ namespace FireWallet
|
||||
hsdProcess.Start();
|
||||
// Wait for HSD to start
|
||||
await Task.Delay(2000);
|
||||
|
||||
// Check if HSD is running
|
||||
if (hsdProcess.HasExited)
|
||||
{
|
||||
AddLog("HSD Failed to start");
|
||||
AddLog(hsdProcess.StandardError.ReadToEnd());
|
||||
NotifyForm Notifyinstall = new NotifyForm("HSD Failed to start\nPlease check the logs");
|
||||
Notifyinstall.ShowDialog();
|
||||
Notifyinstall.Dispose();
|
||||
|
||||
// Wait for the notification to show
|
||||
await Task.Delay(1000);
|
||||
this.Close();
|
||||
|
||||
await Task.Delay(1000);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -225,9 +257,7 @@ namespace FireWallet
|
||||
AddLog(ex.Message);
|
||||
this.Close();
|
||||
await Task.Delay(1000);
|
||||
AddLog("Close Failed");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
timerNodeStatus.Start();
|
||||
@@ -1315,6 +1345,72 @@ namespace FireWallet
|
||||
}
|
||||
}
|
||||
|
||||
// Check if git is installed
|
||||
Process testInstalled = new Process();
|
||||
testInstalled.StartInfo.FileName = "git";
|
||||
testInstalled.StartInfo.Arguments = "-v";
|
||||
testInstalled.StartInfo.RedirectStandardOutput = true;
|
||||
testInstalled.StartInfo.UseShellExecute = false;
|
||||
testInstalled.StartInfo.CreateNoWindow = true;
|
||||
testInstalled.Start();
|
||||
string outputInstalled = testInstalled.StandardOutput.ReadToEnd();
|
||||
testInstalled.WaitForExit();
|
||||
|
||||
if (!outputInstalled.Contains("git version"))
|
||||
{
|
||||
AddLog("Git is not installed");
|
||||
NotifyForm notifyForm = new NotifyForm("Git is not installed\nPlease install it to install HSD dependencies");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if node installed
|
||||
testInstalled = new Process();
|
||||
testInstalled.StartInfo.FileName = "node";
|
||||
testInstalled.StartInfo.Arguments = "-v";
|
||||
testInstalled.StartInfo.RedirectStandardOutput = true;
|
||||
testInstalled.StartInfo.UseShellExecute = false;
|
||||
testInstalled.StartInfo.CreateNoWindow = true;
|
||||
testInstalled.Start();
|
||||
outputInstalled = testInstalled.StandardOutput.ReadToEnd();
|
||||
testInstalled.WaitForExit();
|
||||
|
||||
if (!outputInstalled.Contains("v"))
|
||||
{
|
||||
AddLog("Node is not installed");
|
||||
NotifyForm notifyForm = new NotifyForm("Node is not installed\nPlease install it to install HSD dependencies");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Check if npm installed
|
||||
testInstalled = new Process();
|
||||
testInstalled.StartInfo.FileName = "npm";
|
||||
testInstalled.StartInfo.Arguments = "-v";
|
||||
testInstalled.StartInfo.RedirectStandardOutput = true;
|
||||
testInstalled.StartInfo.UseShellExecute = false;
|
||||
testInstalled.StartInfo.CreateNoWindow = true;
|
||||
testInstalled.Start();
|
||||
outputInstalled = testInstalled.StandardOutput.ReadToEnd();
|
||||
testInstalled.WaitForExit();
|
||||
|
||||
if (outputInstalled.Length < 3)
|
||||
{
|
||||
AddLog("NPM is not installed");
|
||||
NotifyForm notifyForm = new NotifyForm("NPM is not installed\nPlease install it to install HSD dependencies");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
startInfo.FileName = "git";
|
||||
startInfo.Arguments = $"clone {repositoryUrl} {destinationPath}";
|
||||
@@ -1362,6 +1458,32 @@ namespace FireWallet
|
||||
{
|
||||
AddLog("Git/NPM Install FAILED");
|
||||
AddLog(ex.Message);
|
||||
if (ex.Message.Contains("to start process 'git'"))
|
||||
{
|
||||
NotifyForm notifyForm = new NotifyForm("Git needs to be installed\nCheck logs for more details");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
}
|
||||
else if (ex.Message.Contains("to start process 'node'"))
|
||||
{
|
||||
NotifyForm notifyForm = new NotifyForm("Node needs to be installed\nCheck logs for more details");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
}
|
||||
else if (ex.Message.Contains("to start process 'npm'"))
|
||||
{
|
||||
NotifyForm notifyForm = new NotifyForm("NPM needs to be installed\nCheck logs for more details");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
NotifyForm notifyForm = new NotifyForm("Git/NPM Install FAILED\nCheck logs for more details");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
public bool CheckNodeInstalled()
|
||||
|
||||
@@ -224,15 +224,15 @@
|
||||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:FireWallet"
|
||||
"ProductCode" = "8:{24264791-86B1-49B5-88C9-5042C3FA1BF2}"
|
||||
"PackageCode" = "8:{8CC25786-EE60-4F7F-970E-D122B84DF8B5}"
|
||||
"ProductCode" = "8:{D203173F-39CF-4D8C-810D-FF6840540AF3}"
|
||||
"PackageCode" = "8:{419FAC68-35FF-48D7-AD7D-83813C7CF72A}"
|
||||
"UpgradeCode" = "8:{0C86F725-6B01-4173-AA05-3F0EDF481362}"
|
||||
"AspNetVersion" = "8:"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:2.4"
|
||||
"ProductVersion" = "8:2.5"
|
||||
"Manufacturer" = "8:Nathan.Woodburn/"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:https://l.woodburn.au/discord"
|
||||
|
||||
Reference in New Issue
Block a user