mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 09:17:36 +00:00
coins: prefer tx label
This commit is contained in:
parent
a2a185b46c
commit
4cde3d4eb1
4 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,7 @@ void Coins::refresh()
|
|||
ci->m_subaddrAccount = td.m_subaddr_index.major;
|
||||
ci->m_address = QString::fromStdString(m_wallet2->get_subaddress_as_str(td.m_subaddr_index)); // todo: this is expensive, cache maybe?
|
||||
ci->m_addressLabel = QString::fromStdString(m_wallet2->get_subaddress_label(td.m_subaddr_index));
|
||||
ci->m_txNote = QString::fromStdString(m_wallet2->get_tx_note(td.m_txid));
|
||||
ci->m_keyImage = QString::fromStdString(epee::string_tools::pod_to_hex(td.m_key_image));
|
||||
ci->m_unlockTime = td.m_tx.unlock_time;
|
||||
ci->m_unlocked = m_wallet2->is_transfer_unlocked(td);
|
||||
|
|
|
@ -120,6 +120,10 @@ bool CoinsInfo::change() const {
|
|||
return m_change;
|
||||
}
|
||||
|
||||
QString CoinsInfo::txNote() const {
|
||||
return m_txNote;
|
||||
}
|
||||
|
||||
CoinsInfo::CoinsInfo(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_blockHeight(0)
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
bool coinbase() const;
|
||||
QString description() const;
|
||||
bool change() const;
|
||||
QString txNote() const;
|
||||
|
||||
void setUnlocked(bool unlocked);
|
||||
|
||||
|
@ -70,6 +71,7 @@ private:
|
|||
bool m_coinbase;
|
||||
QString m_description;
|
||||
bool m_change;
|
||||
QString m_txNote;
|
||||
};
|
||||
|
||||
#endif //FEATHER_COINSINFO_H
|
||||
|
|
|
@ -228,6 +228,8 @@ QVariant CoinsModel::parseTransactionInfo(const CoinsInfo &cInfo, int column, in
|
|||
case Label: {
|
||||
if (!cInfo.description().isEmpty())
|
||||
return cInfo.description();
|
||||
if (!cInfo.txNote().isEmpty())
|
||||
return cInfo.txNote();
|
||||
return cInfo.addressLabel();
|
||||
}
|
||||
case Spent:
|
||||
|
|
Loading…
Reference in a new issue