main: HIP-02 fix for Bob port

If Bob is the HSD FireWallet is connected to use the default Bob DNS resolver port
This commit is contained in:
Nathan Woodburn 2023-06-18 20:24:58 +10:00
parent df8c675588
commit fae4bff32b
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -1355,6 +1355,13 @@ 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)
{
string bobPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Bob\\hsd_data";
if (Directory.Exists(bobPath))
{
port = 9892;
}
} }
NameServer nameServer = new NameServer(IPAddress.Parse(ip), port); NameServer nameServer = new NameServer(IPAddress.Parse(ip), port);