|
|
|
@ -1112,6 +1112,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
if not self.network: |
|
|
|
if not self.network: |
|
|
|
self.show_error(_("You are offline.")) |
|
|
|
self.show_error(_("You are offline.")) |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
if not self.wallet.lnworker: |
|
|
|
|
|
|
|
self.show_error(_('Lightning is disabled')) |
|
|
|
|
|
|
|
return |
|
|
|
if not self.wallet.lnworker.num_sats_can_send() and not self.wallet.lnworker.num_sats_can_receive(): |
|
|
|
if not self.wallet.lnworker.num_sats_can_send() and not self.wallet.lnworker.num_sats_can_receive(): |
|
|
|
self.show_error(_("You do not have liquidity in your active channels.")) |
|
|
|
self.show_error(_("You do not have liquidity in your active channels.")) |
|
|
|
return |
|
|
|
return |
|
|
|
@ -2130,6 +2133,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener): |
|
|
|
def import_channel_backup(self, encrypted: str): |
|
|
|
def import_channel_backup(self, encrypted: str): |
|
|
|
if not self.question('Import channel backup?'): |
|
|
|
if not self.question('Import channel backup?'): |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
if not self.wallet.lnworker: |
|
|
|
|
|
|
|
self.show_error(_('Lightning is disabled')) |
|
|
|
|
|
|
|
return |
|
|
|
try: |
|
|
|
try: |
|
|
|
self.wallet.lnworker.import_channel_backup(encrypted) |
|
|
|
self.wallet.lnworker.import_channel_backup(encrypted) |
|
|
|
except Exception as e: |
|
|
|
except Exception as e: |
|
|
|
|