bug: Fixed renewals failing to send
This was caused by SPV not having the same rpc
This commit is contained in:
parent
14dad4ba35
commit
c313f60f8b
@ -57,8 +57,10 @@ public partial class DomainForm : Form
|
|||||||
|
|
||||||
private async void buttonRenew_Click(object sender, EventArgs e)
|
private async void buttonRenew_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var content = "{\"method\": \"renew\", \"params\": [\"" + Domain + "\"]}";
|
var path = "wallet/" + Main.Account + "/renewal";
|
||||||
var response = await Main.APIPost("", true, content);
|
var content = "{\"passphrase\": \"" + Main.Password + "\", \"name\": \"" + Domain +
|
||||||
|
"\", \"broadcast\": true, \"sign\": true}";
|
||||||
|
var response = await Main.APIPost(path, true, content);
|
||||||
if (response == "Error")
|
if (response == "Error")
|
||||||
{
|
{
|
||||||
var notify = new NotifyForm("Error renewing domain");
|
var notify = new NotifyForm("Error renewing domain");
|
||||||
@ -68,16 +70,13 @@ public partial class DomainForm : Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
var jObject = JObject.Parse(response);
|
var jObject = JObject.Parse(response);
|
||||||
if (jObject.ContainsKey("result"))
|
if (jObject.ContainsKey("hash"))
|
||||||
{
|
{
|
||||||
Main.AddLog(jObject["result"].ToString());
|
var txid = jObject["hash"].ToString();
|
||||||
var result = (JObject)jObject["result"];
|
var notify = new NotifyForm("Renew sent", "Explorer", Main.TXExplorer + txid);
|
||||||
if (result.ContainsKey("txid"))
|
|
||||||
{
|
|
||||||
var txid = result["txid"].ToString();
|
|
||||||
var notify = new NotifyForm("Renewed domain", "Explorer", Main.TXExplorer + txid);
|
|
||||||
notify.ShowDialog();
|
notify.ShowDialog();
|
||||||
notify.Dispose();
|
notify.Dispose();
|
||||||
|
AddDomainInfo("closed");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -86,14 +85,6 @@ public partial class DomainForm : Form
|
|||||||
notify.Dispose();
|
notify.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var notify = new NotifyForm("Error renewing domain");
|
|
||||||
notify.ShowDialog();
|
|
||||||
notify.Dispose();
|
|
||||||
Main.AddLog(jObject.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void buttonTransfer_Click(object sender, EventArgs e)
|
private async void buttonTransfer_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -136,12 +127,12 @@ public partial class DomainForm : Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonFinalize_Click(object sender, EventArgs e)
|
private async void buttonFinalize_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var path = "wallet/" + Main.Account + "/finalize";
|
var path = "wallet/" + Main.Account + "/finalize";
|
||||||
var content = "{\"passphrase\": \"" + Main.Password + "\", \"name\": \"" + Domain +
|
var content = "{\"passphrase\": \"" + Main.Password + "\", \"name\": \"" + Domain +
|
||||||
"\", \"broadcast\": true, \"sign\": true}";
|
"\", \"broadcast\": true, \"sign\": true}";
|
||||||
var response = Main.APIPost(path, true, content).Result;
|
var response = await Main.APIPost(path, true, content);
|
||||||
if (response == "Error")
|
if (response == "Error")
|
||||||
{
|
{
|
||||||
var notify = new NotifyForm("Error finalizing transfer");
|
var notify = new NotifyForm("Error finalizing transfer");
|
||||||
@ -167,12 +158,12 @@ public partial class DomainForm : Form
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonCancel_Click(object sender, EventArgs e)
|
private async void buttonCancel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var path = "wallet/" + Main.Account + "/cancel";
|
var path = "wallet/" + Main.Account + "/cancel";
|
||||||
var content = "{\"passphrase\": \"" + Main.Password + "\", \"name\": \"" + Domain +
|
var content = "{\"passphrase\": \"" + Main.Password + "\", \"name\": \"" + Domain +
|
||||||
"\", \"broadcast\": true, \"sign\": true}";
|
"\", \"broadcast\": true, \"sign\": true}";
|
||||||
var response = Main.APIPost(path, true, content).Result;
|
var response = await Main.APIPost(path, true, content);
|
||||||
if (response == "Error")
|
if (response == "Error")
|
||||||
{
|
{
|
||||||
var notify = new NotifyForm("Error cancelling transfer");
|
var notify = new NotifyForm("Error cancelling transfer");
|
||||||
|
Loading…
Reference in New Issue
Block a user