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",
|
||||
"--debug",
|
||||
"deal",
|
||||
"negative",
|
||||
"-m",
|
||||
"feedback_message",
|
||||
"-s",
|
||||
"Hxhv4ewOOVGbydibNzdNxaWPDkFhDi0N3rdXtPVe5YtkfR2RECUG5KebcRCBmgN94t/NVYBOo/ft/FN1q6p42l8=",
|
||||
"2NAFmjLid526kjekoMiCm8nX5SxFCfk7jgC"
|
||||
"status",
|
||||
"2NDkN9PWdvf8T3AFe57vDsQX9qeJG5Y5iJW"
|
||||
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
|
||||
@@ -241,7 +241,7 @@ int Deals::Status()
|
||||
std::ostringstream stream;
|
||||
|
||||
bool isPayment = false;
|
||||
string payload = cleanup_html(base64_decode(jsonData["payload"]));
|
||||
string payload = base64_decode(jsonData["payload"]);
|
||||
stream << payload << endl;
|
||||
// order: Paid, order: Completed, order: Executed
|
||||
if (payload.find("Paid") >= 0 || payload.find("Completed") >= 0 || payload.find("Executed") >= 0)
|
||||
@@ -253,7 +253,7 @@ int Deals::Status()
|
||||
cout << decoded << endl;
|
||||
|
||||
if (isDebug)
|
||||
ShowDebug(data, decoded, 1, payload);
|
||||
ShowDebug(data, decoded, 1, result);
|
||||
if (parser.cmdOptionExists("-i") || parser.cmdOptionExists("--is-paid"))
|
||||
{
|
||||
return isPayment == true ? 0 : 1;
|
||||
|
||||
Reference in New Issue
Block a user