fix create_menu error #5609

This commit is contained in:
ThomasV 2019-09-03 14:50:34 +02:00
parent ab76a1fe5b
commit 2801539087

View file

@ -602,7 +602,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
height = self.wallet.get_tx_height(tx_hash).height
is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(tx)
is_unconfirmed = height <= 0
pr_key = self.wallet.invoices.paid.get(tx_hash)
#pr_key = self.wallet.invoices.paid.get(tx_hash)
menu = QMenu()
if height in [TX_HEIGHT_FUTURE, TX_HEIGHT_LOCAL]:
menu.addAction(_("Remove"), lambda: self.remove_local_tx(tx_hash))
@ -629,8 +629,8 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
child_tx = self.wallet.cpfp(tx, 0)
if child_tx:
menu.addAction(_("Child pays for parent"), lambda: self.parent.cpfp(tx, child_tx))
if pr_key:
menu.addAction(read_QIcon("seal"), _("View invoice"), lambda: self.parent.show_invoice(pr_key))
#if pr_key:
# menu.addAction(read_QIcon("seal"), _("View invoice"), lambda: self.parent.show_invoice(pr_key))
if tx_URL:
menu.addAction(_("View on block explorer"), lambda: webopen(tx_URL))
menu.exec_(self.viewport().mapToGlobal(position))