|
@ -98,10 +98,16 @@ class ChannelsList(MyTreeView): |
|
|
WaitingDialog(self, 'please wait..', task, self.on_success, self.on_failure) |
|
|
WaitingDialog(self, 'please wait..', task, self.on_success, self.on_failure) |
|
|
|
|
|
|
|
|
def force_close(self, channel_id): |
|
|
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(): |
|
|
if self.lnworker.wallet.is_lightning_backup(): |
|
|
msg = _('WARNING: force-closing from an old state might result in fund loss.\nAre you sure?') |
|
|
msg = _('WARNING: force-closing from an old state might result in fund loss.\nAre you sure?') |
|
|
else: |
|
|
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): |
|
|
if self.parent.question(msg): |
|
|
def task(): |
|
|
def task(): |
|
|
coro = self.lnworker.force_close_channel(channel_id) |
|
|
coro = self.lnworker.force_close_channel(channel_id) |
|
|