mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +00:00
history: use subaddress label as default tx description
This commit is contained in:
parent
46e0215953
commit
af4259a2bd
1 changed files with 10 additions and 2 deletions
|
@ -97,7 +97,6 @@ void TransactionHistory::refresh()
|
|||
t->m_direction = TransactionRow::Direction_In;
|
||||
t->m_hash = QString::fromStdString(epee::string_tools::pod_to_hex(pd.m_tx_hash));
|
||||
t->m_blockHeight = pd.m_block_height;
|
||||
t->m_description = QString::fromStdString(m_wallet2->get_tx_note(pd.m_tx_hash));
|
||||
t->m_subaddrIndex = { pd.m_subaddr_index.minor };
|
||||
t->m_subaddrAccount = pd.m_subaddr_index.major;
|
||||
t->m_label = QString::fromStdString(m_wallet2->get_subaddress_label(pd.m_subaddr_index));
|
||||
|
@ -105,6 +104,11 @@ void TransactionHistory::refresh()
|
|||
t->m_confirmations = (wallet_height > pd.m_block_height) ? wallet_height - pd.m_block_height : 0;
|
||||
t->m_unlockTime = pd.m_unlock_time;
|
||||
|
||||
t->m_description = QString::fromStdString(m_wallet2->get_tx_note(pd.m_tx_hash));
|
||||
if (t->m_description.isEmpty()) {
|
||||
t->m_description = QString::fromStdString(m_wallet2->get_subaddress_label(pd.m_subaddr_index));
|
||||
}
|
||||
|
||||
m_rows.append(t);
|
||||
}
|
||||
|
||||
|
@ -244,7 +248,6 @@ void TransactionHistory::refresh()
|
|||
t->m_direction = TransactionRow::Direction_In;
|
||||
t->m_hash = QString::fromStdString(epee::string_tools::pod_to_hex(pd.m_tx_hash));
|
||||
t->m_blockHeight = pd.m_block_height;
|
||||
t->m_description = QString::fromStdString(m_wallet2->get_tx_note(pd.m_tx_hash));
|
||||
t->m_pending = true;
|
||||
t->m_subaddrIndex = { pd.m_subaddr_index.minor };
|
||||
t->m_subaddrAccount = pd.m_subaddr_index.major;
|
||||
|
@ -252,6 +255,11 @@ void TransactionHistory::refresh()
|
|||
t->m_timestamp = QDateTime::fromSecsSinceEpoch(pd.m_timestamp);
|
||||
t->m_confirmations = 0;
|
||||
|
||||
t->m_description = QString::fromStdString(m_wallet2->get_tx_note(pd.m_tx_hash));
|
||||
if (t->m_description.isEmpty()) {
|
||||
t->m_description = QString::fromStdString(m_wallet2->get_subaddress_label(pd.m_subaddr_index));
|
||||
}
|
||||
|
||||
m_rows.append(t);
|
||||
|
||||
LOG_PRINT_L1(__FUNCTION__ << ": Unconfirmed payment found " << pd.m_amount);
|
||||
|
|
Loading…
Reference in a new issue