diff --git a/src/utils/monero_utils.h b/src/utils/monero_utils.h index 8308262..8408510 100644 --- a/src/utils/monero_utils.h +++ b/src/utils/monero_utils.h @@ -83,6 +83,8 @@ namespace monero_utils /** * Add number, string, and boolean json members using template specialization. + * + * TODO: addJsonMember("key", "val", ...) treated as integer instead of string literal */ template void addJsonMember(std::string key, T val, rapidjson::Document::AllocatorType& allocator, rapidjson::Value& root, rapidjson::Value& field) { diff --git a/src/wallet/monero_wallet_model.cpp b/src/wallet/monero_wallet_model.cpp index 71678d9..cec5537 100644 --- a/src/wallet/monero_wallet_model.cpp +++ b/src/wallet/monero_wallet_model.cpp @@ -1285,7 +1285,7 @@ namespace monero { // set string values rapidjson::Value value_str(rapidjson::kStringType); - monero_utils::addJsonMember("signatureType", m_signature_type == monero_message_signature_type::SIGN_WITH_SPEND_KEY ? "spend" : "view", allocator, root, value_str); + monero_utils::addJsonMember("signatureType", m_signature_type == monero_message_signature_type::SIGN_WITH_SPEND_KEY ? std::string("spend") : std::string("view"), allocator, root, value_str); // return root return root;