main: Fixed installation of hsd

This commit is contained in:
Nathan Woodburn 2023-06-15 22:21:12 +10:00
parent 95d0498672
commit 6894e9c079
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -221,6 +221,28 @@ namespace FireWallet
return false;
}
}
} else
{
if (!Directory.Exists(dir + "hsd"))
{
NotifyForm Notifyinstall = new NotifyForm("Installing hsd\nThis may take a few minutes\nDo not close FireWallet", false);
Notifyinstall.Show();
// Wait for the notification to show
await Task.Delay(1000);
string repositoryUrl = "https://github.com/handshake-org/hsd.git";
string destinationPath = dir + "hsd";
CloneRepository(repositoryUrl, destinationPath);
Notifyinstall.CloseNotification();
Notifyinstall.Dispose();
}
if (!Directory.Exists(dir + "hsd\\node_modules"))
{
AddLog("HSD install failed");
this.Close();
return false;
}
}