Close #10 исправил вывод статуса

This commit is contained in:
Vladimir N. Korotenko
2025-11-25 09:32:16 +03:00
parent 5e15f1f610
commit aae91d6586
2 changed files with 5 additions and 8 deletions

View File

@@ -15,12 +15,9 @@
"https://testnet-dm2.bitdeals.org", "https://testnet-dm2.bitdeals.org",
"--debug", "--debug",
"deal", "deal",
"negative", "status",
"-m", "2NDkN9PWdvf8T3AFe57vDsQX9qeJG5Y5iJW"
"feedback_message",
"-s",
"Hxhv4ewOOVGbydibNzdNxaWPDkFhDi0N3rdXtPVe5YtkfR2RECUG5KebcRCBmgN94t/NVYBOo/ft/FN1q6p42l8=",
"2NAFmjLid526kjekoMiCm8nX5SxFCfk7jgC"
], ],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",

View File

@@ -241,7 +241,7 @@ int Deals::Status()
std::ostringstream stream; std::ostringstream stream;
bool isPayment = false; bool isPayment = false;
string payload = cleanup_html(base64_decode(jsonData["payload"])); string payload = base64_decode(jsonData["payload"]);
stream << payload << endl; stream << payload << endl;
// order: Paid, order: Completed, order: Executed // order: Paid, order: Completed, order: Executed
if (payload.find("Paid") >= 0 || payload.find("Completed") >= 0 || payload.find("Executed") >= 0) if (payload.find("Paid") >= 0 || payload.find("Completed") >= 0 || payload.find("Executed") >= 0)
@@ -253,7 +253,7 @@ int Deals::Status()
cout << decoded << endl; cout << decoded << endl;
if (isDebug) if (isDebug)
ShowDebug(data, decoded, 1, payload); ShowDebug(data, decoded, 1, result);
if (parser.cmdOptionExists("-i") || parser.cmdOptionExists("--is-paid")) if (parser.cmdOptionExists("-i") || parser.cmdOptionExists("--is-paid"))
{ {
return isPayment == true ? 0 : 1; return isPayment == true ? 0 : 1;