main: Fixed names page having errors when a domain is in auction

This commit is contained in:
Nathan Woodburn 2023-06-11 13:28:35 +10:00
parent 21ef8b2139
commit 145047b614
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -1468,17 +1468,23 @@ namespace FireWallet
domainName.Left = 5; domainName.Left = 5;
domainName.AutoSize = true; domainName.AutoSize = true;
JObject stats = JObject.Parse(name["stats"].ToString());
domainTMP.Controls.Add(domainName);
Label expiry = new Label(); Label expiry = new Label();
JObject stats = JObject.Parse(name["stats"].ToString());
if (stats.ContainsKey("daysUntilExpire"))
{
expiry.Text = "Expires: " + stats["daysUntilExpire"].ToString() + " days"; expiry.Text = "Expires: " + stats["daysUntilExpire"].ToString() + " days";
expiry.Top = 5; expiry.Top = 5;
expiry.AutoSize = true; expiry.AutoSize = true;
expiry.Left = domainTMP.Width - expiry.Width - 100; expiry.Left = domainTMP.Width - expiry.Width - 100;
domainTMP.Controls.Add(domainName);
domainTMP.Controls.Add(expiry); domainTMP.Controls.Add(expiry);
}
panelDomainList.Controls.Add(domainTMP); panelDomainList.Controls.Add(domainTMP);
i++; i++;
} }