mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
Qt: add info about force closing
This commit is contained in:
parent
fbf6af5d07
commit
b36e9a6451
1 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue