Close #16 fix ulong compare with int

This commit is contained in:
Vladimir N. Korotenko
2025-11-25 19:54:36 +03:00
parent 60a7864828
commit f8de280295
3 changed files with 13 additions and 6 deletions

View File

@@ -11,12 +11,14 @@
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${workspaceFolder}/dm-cli", "program": "${workspaceFolder}/dm-cli",
"args": [ "--address", "args": [
"https://testnet-dm2.bitdeals.org", "--address",
"--debug", "https://testnet-dm2.bitdeals.org",
"--debug",
"deal", "deal",
"status", "status",
"2NDkN9PWdvf8T3AFe57vDsQX9qeJG5Y5iJW" "--is-paid",
"2N1t5Pe45KCRMtXAQ9P9LiHAzdB5Nq4djhR"
], ],
"stopAtEntry": false, "stopAtEntry": false,

View File

@@ -244,7 +244,12 @@ int Deals::Status()
string payload = 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)
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; isPayment = true;
} }

View File

@@ -29,7 +29,7 @@
// LANG=ru_RU.UTF-8 // LANG=ru_RU.UTF-8
#define LANG_RU "ru_RU.UTF-8" #define LANG_RU "ru_RU.UTF-8"
#define DEFAULTADDRESS "http://127.0.0.1:4999" #define DEFAULTADDRESS "127.0.0.1:4999"
#define ACCOUNT_UPDATE_URL "tpl/accountupdateurl.txt" #define ACCOUNT_UPDATE_URL "tpl/accountupdateurl.txt"
#define ACCOUNT_UPDATE_BTM "tpl/accountupdatebtm.txt" #define ACCOUNT_UPDATE_BTM "tpl/accountupdatebtm.txt"