Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactiondesc.cpp
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, | ||||
| } else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty()) { | } else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty()) { | ||||
| // Online transaction | // Online transaction | ||||
| strHTML += "<b>" + tr("From") + ":</b> " + | strHTML += "<b>" + tr("From") + ":</b> " + | ||||
| GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>"; | GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>"; | ||||
| } else { | } else { | ||||
| // Offline transaction | // Offline transaction | ||||
| if (nNet > Amount(0)) { | if (nNet > Amount(0)) { | ||||
| // Credit | // Credit | ||||
| CTxDestination address = DecodeDestination(rec->address); | CTxDestination address = | ||||
| DecodeDestination(rec->address, wallet->chainParams); | |||||
| if (IsValidDestination(address)) { | if (IsValidDestination(address)) { | ||||
| if (wallet->mapAddressBook.count(address)) { | if (wallet->mapAddressBook.count(address)) { | ||||
| strHTML += | strHTML += | ||||
| "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>"; | "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>"; | ||||
| strHTML += "<b>" + tr("To") + ":</b> "; | strHTML += "<b>" + tr("To") + ":</b> "; | ||||
| strHTML += GUIUtil::HtmlEscape(rec->address); | strHTML += GUIUtil::HtmlEscape(rec->address); | ||||
| QString addressOwned = | QString addressOwned = | ||||
| (::IsMine(*wallet, address) == ISMINE_SPENDABLE) | (::IsMine(*wallet, address) == ISMINE_SPENDABLE) | ||||
| Show All 15 Lines | QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, | ||||
| // | // | ||||
| // To | // To | ||||
| // | // | ||||
| if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty()) { | if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty()) { | ||||
| // Online transaction | // Online transaction | ||||
| std::string strAddress = wtx.mapValue["to"]; | std::string strAddress = wtx.mapValue["to"]; | ||||
| strHTML += "<b>" + tr("To") + ":</b> "; | strHTML += "<b>" + tr("To") + ":</b> "; | ||||
| CTxDestination dest = DecodeDestination(strAddress); | CTxDestination dest = | ||||
| DecodeDestination(strAddress, wallet->chainParams); | |||||
| if (wallet->mapAddressBook.count(dest) && | if (wallet->mapAddressBook.count(dest) && | ||||
| !wallet->mapAddressBook[dest].name.empty()) | !wallet->mapAddressBook[dest].name.empty()) | ||||
| strHTML += | strHTML += | ||||
| GUIUtil::HtmlEscape(wallet->mapAddressBook[dest].name) + " "; | GUIUtil::HtmlEscape(wallet->mapAddressBook[dest].name) + " "; | ||||
| strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>"; | strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>"; | ||||
| } | } | ||||
| // | // | ||||
| ▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines | |||||