Committing updates.

This commit is contained in:
Преподобный Ален
2023-08-21 17:47:31 +03:00
parent 0a04a8b8fb
commit 8f5e4422a4
2 changed files with 33 additions and 16 deletions

View File

@@ -154,6 +154,14 @@ namespace Apostol {
return doCreate;
} else if (S == "created") {
return doCreated;
} else if (S == "submit") {
return doSubmit;
} else if (S == "submitted") {
return doSubmitted;
} else if (S == "confirm") {
return doConfirm;
} else if (S == "confirmed") {
return doConfirmed;
} else if (S == "pay") {
return doPay;
} else if (S == "paid") {
@@ -192,6 +200,14 @@ namespace Apostol {
return "Create";
case doCreated:
return "Created";
case doSubmit:
return "Submit";
case doSubmitted:
return "Submitted";
case doConfirm:
return "Confirm";
case doConfirmed:
return "Confirmed";
case doPay:
return "Pay";
case doPaid:
@@ -291,15 +307,16 @@ namespace Apostol {
CString DealData::GetStringData() const {
CString Data;
CString S;
Data.Format("Type: %d;", (int) Type);
Data.Format("URL: %s;", At.c_str());
Data.Format("Date: %s;", Date.c_str());
Data.Format("Seller: %s;", Seller.Address.c_str());
Data.Format("Customer: %s;", Customer.Address.c_str());
Data.Format("Until: %s;", Payment.Until.c_str());
Data.Format("Sum: %s;", Payment.Sum.c_str());
Data.Format("LeaveBefore: %s", FeedBack.LeaveBefore.c_str());
Data = S.Format("Type: %d;", (int) Type);
Data += S.Format("URL: %s;", At.c_str());
Data += S.Format("Date: %s;", Date.c_str());
Data += S.Format("Seller: %s;", Seller.Address.c_str());
Data += S.Format("Customer: %s;", Customer.Address.c_str());
Data += S.Format("Until: %s;", Payment.Until.c_str());
Data += S.Format("Sum: %s;", Payment.Sum.c_str());
Data += S.Format("LeaveBefore: %s", FeedBack.LeaveBefore.c_str());
return Data;
}
@@ -422,7 +439,7 @@ namespace Apostol {
//--------------------------------------------------------------------------------------------------------------
std::string CDeal::get_payment_ek(const std::string &key1, const std::string &key2, std::string &key3,
uint8_t version_key, uint8_t version_script) {
uint8_t version_key, uint8_t version_script) {
CWitness Witness(ec_public(key1), ec_public(key2), key3.empty() ? to_public_ek(version_key) : ec_public(key3));
@@ -436,7 +453,7 @@ namespace Apostol {
//--------------------------------------------------------------------------------------------------------------
std::string CDeal::get_payment_hd(const std::string &key1, const std::string &key2, std::string &key3,
uint64_t prefixes, uint8_t version_script) {
uint64_t prefixes, uint8_t version_script) {
CWitness Witness(ec_public(key1), ec_public(key2), key3.empty() ? to_public_hd(prefixes) : ec_public(key3));
@@ -450,7 +467,7 @@ namespace Apostol {
//--------------------------------------------------------------------------------------------------------------
std::string CDeal::get_payment_witness(const std::string &key1, const std::string &key2, std::string &key3,
uint64_t prefixes) {
uint64_t prefixes) {
CWitness Witness(ec_public(key1), ec_public(key2), key3.empty() ? to_public_hd(prefixes) : ec_public(key3));
@@ -462,7 +479,7 @@ namespace Apostol {
//--------------------------------------------------------------------------------------------------------------
CString CDeal::GetPaymentEK(const CString &Key1, const CString &Key2, CString &Key3,
uint8_t version_key, uint8_t version_script) {
uint8_t version_key, uint8_t version_script) {
std::string key3(Key3);
@@ -475,7 +492,7 @@ namespace Apostol {
//--------------------------------------------------------------------------------------------------------------
CString CDeal::GetPaymentHD(const CString &Key1, const CString &Key2, CString &Key3,
uint64_t prefixes, uint8_t version_script) {
uint64_t prefixes, uint8_t version_script) {
std::string key3(Key3);