Remove account name indicator string "son-payment-to:"

This commit is contained in:
serkixenos 2021-08-04 19:00:00 +02:00
parent 380a1260bf
commit 3c6454cd8d

View file

@ -329,14 +329,10 @@ bool sidechain_net_handler_hive::process_proposal(const proposal_object &po) {
} }
std::string memo = op_value.get<std::string>("memo"); std::string memo = op_value.get<std::string>("memo");
boost::trim(memo);
if (!memo.empty()) { if (!memo.empty()) {
boost::trim(memo);
if (memo.find("son-payment-to:") == 0) {
memo = memo.substr(15);
boost::trim(memo);
sidechain_from = memo; sidechain_from = memo;
} }
}
process_ok = (swdo_sidechain_from == sidechain_from) && process_ok = (swdo_sidechain_from == sidechain_from) &&
(swdo_sidechain_currency == sidechain_currency) && (swdo_sidechain_currency == sidechain_currency) &&
@ -879,14 +875,10 @@ void sidechain_net_handler_hive::handle_event(const std::string &event_data) {
} }
std::string memo = op_value.get<std::string>("memo"); std::string memo = op_value.get<std::string>("memo");
boost::trim(memo);
if (!memo.empty()) { if (!memo.empty()) {
boost::trim(memo);
if (memo.find("son-payment-to:") == 0) {
memo = memo.substr(15);
boost::trim(memo);
from = memo; from = memo;
} }
}
if (to == "son-account") { if (to == "son-account") {
const auto &sidechain_addresses_idx = database.get_index_type<sidechain_address_index>().indices().get<by_sidechain_and_deposit_address_and_expires>(); const auto &sidechain_addresses_idx = database.get_index_type<sidechain_address_index>().indices().get<by_sidechain_and_deposit_address_and_expires>();