mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 09:45:18 +00:00
qt coins tab: label(utxo) to consider both label(txid) and label(addr)
related: #6644
This commit is contained in:
parent
4b6c86ecbe
commit
c69ce73814
3 changed files with 4 additions and 3 deletions
|
@ -419,7 +419,7 @@ class BaseTxDialog(QDialog, MessageBoxMixin):
|
|||
# note: when not finalized, RBF and locktime changes do not trigger
|
||||
# a make_tx, so the txid is unreliable, hence:
|
||||
self.tx_hash_e.setText(_('Unknown'))
|
||||
if desc is None:
|
||||
if not desc:
|
||||
self.tx_desc.hide()
|
||||
else:
|
||||
self.tx_desc.setText(_("Description") + ': ' + desc)
|
||||
|
|
|
@ -608,6 +608,7 @@ class MyTreeView(QTreeView):
|
|||
def on_edited(self, idx: QModelIndex, user_role, text):
|
||||
self.parent.wallet.set_label(user_role, text)
|
||||
self.parent.history_model.refresh('on_edited in MyTreeView')
|
||||
self.parent.utxo_list.update()
|
||||
self.parent.update_completions()
|
||||
|
||||
def should_hide(self, row):
|
||||
|
|
|
@ -98,7 +98,7 @@ class UTXOList(MyTreeView):
|
|||
name = utxo.prevout.to_str()
|
||||
name_short = utxo.prevout.txid.hex()[:16] + '...' + ":%d" % utxo.prevout.out_idx
|
||||
self._utxo_dict[name] = utxo
|
||||
label = self.wallet.get_label_for_txid(utxo.prevout.txid.hex())
|
||||
label = self.wallet.get_label_for_txid(utxo.prevout.txid.hex()) or self.wallet.get_label(address)
|
||||
amount = self.parent.format_amount(utxo.value_sats(), whitespaces=True)
|
||||
labels = [name_short, address, label, amount, '%d'%height]
|
||||
utxo_item = [QStandardItem(x) for x in labels]
|
||||
|
@ -178,7 +178,7 @@ class UTXOList(MyTreeView):
|
|||
# "Details"
|
||||
tx = self.wallet.db.get_transaction(txid)
|
||||
if tx:
|
||||
label = self.wallet.get_label_for_txid(txid) or None # Prefer None if empty (None hides the Description: field in the window)
|
||||
label = self.wallet.get_label_for_txid(txid)
|
||||
menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx, tx_desc=label))
|
||||
# "Copy ..."
|
||||
idx = self.indexAt(position)
|
||||
|
|
Loading…
Add table
Reference in a new issue