main: Fixed error check

This commit is contained in:
Nathan Woodburn 2023-06-07 20:23:00 +10:00
parent 3baa6ec8e3
commit 2760e485ce
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -984,12 +984,13 @@ namespace FireWallet
amount.ToString() + ", \"\", \"\", " + subtractFee + " ]}"; amount.ToString() + ", \"\", \"\", " + subtractFee + " ]}";
string output = await APIPost("", true, content); string output = await APIPost("", true, content);
JObject APIresp = JObject.Parse(output); JObject APIresp = JObject.Parse(output);
if (APIresp["error"].ToString() == "null") if (APIresp["error"].ToString() != "")
{ {
NotifyForm notify = new NotifyForm("Error Transaction Failed"); NotifyForm notify = new NotifyForm("Error Transaction Failed");
notify.ShowDialog(); notify.ShowDialog();
return; return;
} }
AddLog(APIresp.ToString());
string hash = APIresp["result"].ToString(); string hash = APIresp["result"].ToString();
string link = userSettings["explorer-tx"] + hash; string link = userSettings["explorer-tx"] + hash;
NotifyForm notifySuccess = new NotifyForm("Transaction Sent\nThis transaction could take up to 20 minutes to mine", NotifyForm notifySuccess = new NotifyForm("Transaction Sent\nThis transaction could take up to 20 minutes to mine",