Browse Source

Qt: add info about force closing

hard-fail-on-bad-server-string
ThomasV 5 years ago
parent
commit
b36e9a6451
  1. 8
      electrum/gui/qt/channels_list.py

8
electrum/gui/qt/channels_list.py

@ -98,10 +98,16 @@ class ChannelsList(MyTreeView):
WaitingDialog(self, 'please wait..', task, self.on_success, self.on_failure)
def force_close(self, channel_id):
chan = self.lnworker.channels[channel_id]
to_self_delay = chan.config[REMOTE].to_self_delay
if self.lnworker.wallet.is_lightning_backup():
msg = _('WARNING: force-closing from an old state might result in fund loss.\nAre you sure?')
else:
msg = _('Force-close channel?\nReclaimed funds will not be immediately available.')
msg = _('Force-close channel?') + '\n\n'\
+ _(f'Funds retrieved from this channel will not be available before {to_self_delay} blocks after forced closure.') + ' '\
+ _('After that delay, funds will be sent to an address derived from your wallet seed.') + '\n\n'\
+ _('In the meantime, channel funds will not be recoverable from your seed, and will be lost if you lose your wallet.') + ' '\
+ _('To avoid that, you should backup your wallet after you force close the channel.')
if self.parent.question(msg):
def task():
coro = self.lnworker.force_close_channel(channel_id)

Loading…
Cancel
Save