Close #10 исправил вывод статуса
This commit is contained in:
9
dm-cli/.vscode/launch.json
vendored
9
dm-cli/.vscode/launch.json
vendored
@@ -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}",
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user