Skip to content

Commit

Permalink
Namecoin / Qt: Use hex valueEncoding in name_firstupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Dec 30, 2021
1 parent 79b1b42 commit 5c93535
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/qt/buynamespage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,18 @@ QString BuyNamesPage::firstupdate(const QString &name, const std::optional<QStri
std::string hexName = EncodeName (vtName, NameEncoding::HEX);
params.pushKV ("name", hexName);

UniValue options(UniValue::VOBJ);
options.pushKV ("nameEncoding", "hex");

if (value)
{
params.pushKV ("value", value.value().toStdString());
}
std::string strValue = value.value().toStdString();
valtype vtValue = valtype (strValue.begin (), strValue.end ());
std::string hexValue = EncodeName (vtValue, NameEncoding::HEX);

UniValue options(UniValue::VOBJ);
options.pushKV ("nameEncoding", "hex");
params.pushKV ("value", hexValue);
options.pushKV ("valueEncoding", "hex");
}

if (transferTo)
{
Expand Down

0 comments on commit 5c93535

Please sign in to comment.