|
|
|
@ -743,7 +743,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop): |
|
|
|
tx_item = idx.internalPointer().get_data() |
|
|
|
tx_item = idx.internalPointer().get_data() |
|
|
|
if tx_item.get('lightning') and tx_item['type'] == 'payment': |
|
|
|
if tx_item.get('lightning') and tx_item['type'] == 'payment': |
|
|
|
menu = QMenu() |
|
|
|
menu = QMenu() |
|
|
|
menu.addAction(_("View Payment"), lambda: self.main_window.show_lightning_transaction(tx_item)) |
|
|
|
menu.addAction(_("Details"), lambda: self.main_window.show_lightning_transaction(tx_item)) |
|
|
|
cc = self.add_copy_menu(menu, idx) |
|
|
|
cc = self.add_copy_menu(menu, idx) |
|
|
|
cc.addAction(_("Payment Hash"), lambda: self.place_text_on_clipboard(tx_item['payment_hash'], title="Payment Hash")) |
|
|
|
cc.addAction(_("Payment Hash"), lambda: self.place_text_on_clipboard(tx_item['payment_hash'], title="Payment Hash")) |
|
|
|
cc.addAction(_("Preimage"), lambda: self.place_text_on_clipboard(tx_item['preimage'], title="Preimage")) |
|
|
|
cc.addAction(_("Preimage"), lambda: self.place_text_on_clipboard(tx_item['preimage'], title="Preimage")) |
|
|
|
@ -761,6 +761,7 @@ class HistoryList(MyTreeView, AcceptFileDragDrop): |
|
|
|
tx_details = self.wallet.get_tx_info(tx) |
|
|
|
tx_details = self.wallet.get_tx_info(tx) |
|
|
|
is_unconfirmed = tx_details.tx_mined_status.height <= 0 |
|
|
|
is_unconfirmed = tx_details.tx_mined_status.height <= 0 |
|
|
|
menu = QMenu() |
|
|
|
menu = QMenu() |
|
|
|
|
|
|
|
menu.addAction(_("Details"), lambda: self.main_window.show_transaction(tx)) |
|
|
|
if tx_details.can_remove: |
|
|
|
if tx_details.can_remove: |
|
|
|
menu.addAction(_("Remove"), lambda: self.remove_local_tx(tx_hash)) |
|
|
|
menu.addAction(_("Remove"), lambda: self.remove_local_tx(tx_hash)) |
|
|
|
copy_menu = self.add_copy_menu(menu, idx) |
|
|
|
copy_menu = self.add_copy_menu(menu, idx) |
|
|
|
@ -772,7 +773,6 @@ class HistoryList(MyTreeView, AcceptFileDragDrop): |
|
|
|
# TODO use siblingAtColumn when min Qt version is >=5.11 |
|
|
|
# TODO use siblingAtColumn when min Qt version is >=5.11 |
|
|
|
persistent = QPersistentModelIndex(org_idx.sibling(org_idx.row(), c)) |
|
|
|
persistent = QPersistentModelIndex(org_idx.sibling(org_idx.row(), c)) |
|
|
|
menu_edit.addAction(_("{}").format(label), lambda p=persistent: self.edit(QModelIndex(p))) |
|
|
|
menu_edit.addAction(_("{}").format(label), lambda p=persistent: self.edit(QModelIndex(p))) |
|
|
|
menu.addAction(_("View Transaction"), lambda: self.main_window.show_transaction(tx)) |
|
|
|
|
|
|
|
channel_id = tx_item.get('channel_id') |
|
|
|
channel_id = tx_item.get('channel_id') |
|
|
|
if channel_id and self.wallet.lnworker and (chan := self.wallet.lnworker.get_channel_by_id(bytes.fromhex(channel_id))): |
|
|
|
if channel_id and self.wallet.lnworker and (chan := self.wallet.lnworker.get_channel_by_id(bytes.fromhex(channel_id))): |
|
|
|
menu.addAction(_("View Channel"), lambda: self.main_window.show_channel_details(chan)) |
|
|
|
menu.addAction(_("View Channel"), lambda: self.main_window.show_channel_details(chan)) |
|
|
|
|