diff options
author | James O'Beirne <james.obeirne@gmail.com> | 2018-04-10 11:50:10 -0400 |
---|---|---|
committer | James O'Beirne <james.obeirne@gmail.com> | 2018-04-25 13:08:53 -0400 |
commit | c5b277033a72650c221084ec0f1326623a810fd0 (patch) | |
tree | 4ea793666e91c081e738dcab2cdfe2078c2e60c3 /src/qt/transactiondesc.cpp | |
parent | a785bc3667d3c11a014da77436a23b1b865458a4 (diff) |
Add purpose arg to Wallet::getAddress
Also make all arguments to getAddress required and document args at call sites.
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r-- | src/qt/transactiondesc.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index f316c3ca45..2cb446c459 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -102,7 +102,7 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall if (IsValidDestination(address)) { std::string name; isminetype ismine; - if (wallet.getAddress(address, &name, &ismine)) + if (wallet.getAddress(address, &name, &ismine, /* purpose= */ nullptr)) { strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>"; strHTML += "<b>" + tr("To") + ":</b> "; @@ -128,7 +128,8 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall strHTML += "<b>" + tr("To") + ":</b> "; CTxDestination dest = DecodeDestination(strAddress); std::string name; - if (wallet.getAddress(dest, &name) && !name.empty()) + if (wallet.getAddress( + dest, &name, /* is_mine= */ nullptr, /* purpose= */ nullptr) && !name.empty()) strHTML += GUIUtil::HtmlEscape(name) + " "; strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>"; } @@ -196,7 +197,8 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall { strHTML += "<b>" + tr("To") + ":</b> "; std::string name; - if (wallet.getAddress(address, &name) && !name.empty()) + if (wallet.getAddress( + address, &name, /* is_mine= */ nullptr, /* purpose= */ nullptr) && !name.empty()) strHTML += GUIUtil::HtmlEscape(name) + " "; strHTML += GUIUtil::HtmlEscape(EncodeDestination(address)); if(toSelf == ISMINE_SPENDABLE) @@ -319,7 +321,7 @@ QString TransactionDesc::toHTML(interfaces::Node& node, interfaces::Wallet& wall if (ExtractDestination(vout.scriptPubKey, address)) { std::string name; - if (wallet.getAddress(address, &name) && !name.empty()) + if (wallet.getAddress(address, &name, /* is_mine= */ nullptr, /* purpose= */ nullptr) && !name.empty()) strHTML += GUIUtil::HtmlEscape(name) + " "; strHTML += QString::fromStdString(EncodeDestination(address)); } |