mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
[Qt] remove trailing output-index from transaction-id
The trailing output-index leads to cases where the user can't look-up the transaction ID in various systems.
This commit is contained in:
parent
26794d4645
commit
7d5e31a82b
@ -240,7 +240,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
|
|||||||
if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
|
if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
|
||||||
strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
|
strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
|
||||||
|
|
||||||
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), rec->idx) + "<br>";
|
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + rec->getTxID() + "<br>";
|
||||||
|
strHTML += "<b>" + tr("Output index") + ":</b> " + QString::number(rec->getOutputIndex()) + "<br>";
|
||||||
|
|
||||||
// Message from normal bitcoin:URI (bitcoin:123...?message=example)
|
// Message from normal bitcoin:URI (bitcoin:123...?message=example)
|
||||||
Q_FOREACH (const PAIRTYPE(std::string, std::string)& r, wtx.vOrderForm)
|
Q_FOREACH (const PAIRTYPE(std::string, std::string)& r, wtx.vOrderForm)
|
||||||
|
@ -260,11 +260,10 @@ bool TransactionRecord::statusUpdateNeeded()
|
|||||||
|
|
||||||
QString TransactionRecord::getTxID() const
|
QString TransactionRecord::getTxID() const
|
||||||
{
|
{
|
||||||
return formatSubTxId(hash, idx);
|
return QString::fromStdString(hash.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TransactionRecord::formatSubTxId(const uint256 &hash, int vout)
|
int TransactionRecord::getOutputIndex() const
|
||||||
{
|
{
|
||||||
return QString::fromStdString(hash.ToString() + strprintf("-%03d", vout));
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ public:
|
|||||||
/** Return the unique identifier for this transaction (part) */
|
/** Return the unique identifier for this transaction (part) */
|
||||||
QString getTxID() const;
|
QString getTxID() const;
|
||||||
|
|
||||||
/** Format subtransaction id */
|
/** Return the output index of the subtransaction */
|
||||||
static QString formatSubTxId(const uint256 &hash, int vout);
|
int getOutputIndex() const;
|
||||||
|
|
||||||
/** Update status from core wallet tx.
|
/** Update status from core wallet tx.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user