forked from Public/monero-gui
Subaddresses minimal version: supports default account only
This commit is contained in:
@@ -83,6 +83,25 @@ QVariant TransactionHistoryModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
break;
|
||||
|
||||
case TransactionSubaddrIndexRole:
|
||||
{
|
||||
QString str = QString{""};
|
||||
bool first = true;
|
||||
for (quint32 i : tInfo->subaddrIndex()) {
|
||||
if (!first)
|
||||
str += QString{","};
|
||||
first = false;
|
||||
str += QString::number(i);
|
||||
}
|
||||
result = str;
|
||||
}
|
||||
break;
|
||||
case TransactionSubaddrAccountRole:
|
||||
result = tInfo->subaddrAccount();
|
||||
break;
|
||||
case TransactionLabelRole:
|
||||
result = tInfo->subaddrIndex().size() == 1 && *tInfo->subaddrIndex().begin() == 0 ? tr("Primary address") : tInfo->label();
|
||||
break;
|
||||
case TransactionConfirmationsRole:
|
||||
result = tInfo->confirmations();
|
||||
break;
|
||||
@@ -133,6 +152,9 @@ QHash<int, QByteArray> TransactionHistoryModel::roleNames() const
|
||||
roleNames.insert(TransactionAtomicAmountRole, "atomicAmount");
|
||||
roleNames.insert(TransactionFeeRole, "fee");
|
||||
roleNames.insert(TransactionBlockHeightRole, "blockHeight");
|
||||
roleNames.insert(TransactionSubaddrIndexRole, "subaddrIndex");
|
||||
roleNames.insert(TransactionSubaddrAccountRole, "subaddrAccount");
|
||||
roleNames.insert(TransactionLabelRole, "label");
|
||||
roleNames.insert(TransactionConfirmationsRole, "confirmations");
|
||||
roleNames.insert(TransactionConfirmationsRequiredRole, "confirmationsRequired");
|
||||
roleNames.insert(TransactionHashRole, "hash");
|
||||
|
||||
Reference in New Issue
Block a user