mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #7761: [Qt] remove trailing output-index from transaction-id
7d5e31a
[Qt] remove trailing output-index from transaction-id (Jonas Schnelli)
This commit is contained in:
parent
1c84417780
commit
18da34e295
@ -264,7 +264,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
|
||||
if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
|
||||
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>";
|
||||
strHTML += "<b>" + tr("Transaction total size") + ":</b> " + QString::number(wtx.GetTotalSize()) + " bytes<br>";
|
||||
|
||||
// Message from normal dash:URI (dash:XyZ...?message=example)
|
||||
|
@ -324,11 +324,10 @@ bool TransactionRecord::statusUpdateNeeded()
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -138,8 +138,8 @@ public:
|
||||
/** Return the unique identifier for this transaction (part) */
|
||||
QString getTxID() const;
|
||||
|
||||
/** Format subtransaction id */
|
||||
static QString formatSubTxId(const uint256 &hash, int vout);
|
||||
/** Return the output index of the subtransaction */
|
||||
int getOutputIndex() const;
|
||||
|
||||
/** Update status from core wallet tx.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user