1
0

wallet/GUI: don't allow "removing" a LN force-close-tx from history

This commit is contained in:
SomberNight
2020-03-02 05:11:08 +01:00
parent 32acc2b10e
commit 7a574c3cbc
4 changed files with 15 additions and 12 deletions

View File

@@ -186,7 +186,7 @@ class TxDialog(Factory.Popup):
for dict_entry in self.ids.output_list.data:
dict_entry['color'], dict_entry['background_color'] = address_colors(self.wallet, dict_entry['address'])
self.is_local_tx = tx_mined_status.height == TX_HEIGHT_LOCAL
self.can_remove_tx = tx_details.can_remove
self.update_action_button()
def update_action_button(self):
@@ -195,7 +195,7 @@ class TxDialog(Factory.Popup):
ActionButtonOption(text=_('Sign'), func=lambda btn: self.do_sign(), enabled=self.can_sign),
ActionButtonOption(text=_('Broadcast'), func=lambda btn: self.do_broadcast(), enabled=self.can_broadcast),
ActionButtonOption(text=_('Bump fee'), func=lambda btn: self.do_rbf(), enabled=self.can_rbf),
ActionButtonOption(text=_('Remove'), func=lambda btn: self.remove_local_tx(), enabled=self.is_local_tx),
ActionButtonOption(text=_('Remove'), func=lambda btn: self.remove_local_tx(), enabled=self.can_remove_tx),
)
num_options = sum(map(lambda o: bool(o.enabled), options))
# if no options available, hide button