Close #9 add json output

This commit is contained in:
Vladimir N. Korotenko
2025-11-25 20:08:59 +03:00
parent f8de280295
commit fa2465808d
2 changed files with 13 additions and 8 deletions

View File

@@ -4,6 +4,8 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// deal negative -m "feedback_message" -s "Hxhv4ewOOVGbydibNzdNxaWPDkFhDi0N3rdXtPVe5YtkfR2RECUG5KebcRCBmgN94t/NVYBOo/ft/FN1q6p42l8=" 2NAFmjLid526kjekoMiCm8nX5SxFCfk7jgC
// -m "feedback_message" -s "Hxhv4ewOOVGbydibNzdNxaWPDkFhDi0N3rdXtPVe5YtkfR2RECUG5KebcRCBmgN94t/NVYBOo/ft/FN1q6p42l8=" 2NAFmjLid526kjekoMiCm8nX5SxFCfk7jgC
//--debug --address https://testnet-dm2.bitdeals.org deal create -t prepayment -s mnumHs9HQMrw2Q1iKLNnx9NzExS7nMLmyp -c mraXx7JrmAmuKypdJ1vseQBXySsdRZE5AC -g 0.01
"version": "0.2.0",
"configurations": [
{
@@ -16,9 +18,16 @@
"https://testnet-dm2.bitdeals.org",
"--debug",
"deal",
"status",
"--is-paid",
"2N1t5Pe45KCRMtXAQ9P9LiHAzdB5Nq4djhR"
"create",
"-t",
"Prepayment",
"-s",
"mnumHs9HQMrw2Q1iKLNnx9NzExS7nMLmyp",
"-c",
"mraXx7JrmAmuKypdJ1vseQBXySsdRZE5AC",
"-g",
"0.01"
],
"stopAtEntry": false,

View File

@@ -169,7 +169,7 @@ int Deals::Create()
string decoded = stream.str();
cout << decoded << endl;
if (isDebug)
ShowDebug(data, decoded, 1, payload);
ShowDebug(data, result, 1, payload);
return 0;
}
@@ -245,10 +245,6 @@ int Deals::Status()
stream << payload << endl;
// order: Paid, order: Completed, order: Executed
int pos = 0;
pos = payload.find("Paid");
pos = payload.find("Completed");
pos = payload.find("Executed");
if ((int)payload.find("Paid") != -1 || (int)payload.find("Completed") != -1 || (int)payload.find("Executed") != -1)
{
isPayment = true;