URI: 
       tfix #4503: in kivy, catch NotEnoughFunds raised on open channel. - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 64292fd1420f236eef43e8d45e20589c3b18bb88
   DIR parent 8aecbca11c11decff654c5da325c3fc51ec36dc0
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Sat,  5 Dec 2020 10:27:35 +0100
       
       fix #4503: in kivy, catch NotEnoughFunds raised on open channel.
       
       Diffstat:
         M electrum/gui/kivy/uix/dialogs/ligh… |      14 ++++++++------
       
       1 file changed, 8 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/electrum/gui/kivy/uix/dialogs/lightning_open_channel.py b/electrum/gui/kivy/uix/dialogs/lightning_open_channel.py
       t@@ -161,13 +161,15 @@ class LightningOpenChannelDialog(Factory.Popup, Logger):
        
            def do_open_channel(self, conn_str, amount, password):
                coins = self.app.wallet.get_spendable_coins(None, nonlocal_only=True)
       -        funding_tx = self.app.wallet.lnworker.mktx_for_open_channel(coins=coins, funding_sat=amount)
       +        lnworker = self.app.wallet.lnworker
                try:
       -            chan, funding_tx = self.app.wallet.lnworker.open_channel(connect_str=conn_str,
       -                                                                     funding_tx=funding_tx,
       -                                                                     funding_sat=amount,
       -                                                                     push_amt_sat=0,
       -                                                                     password=password)
       +            funding_tx = lnworker.mktx_for_open_channel(coins=coins, funding_sat=amount)
       +            chan, funding_tx = lnworker.open_channel(
       +                connect_str=conn_str,
       +                funding_tx=funding_tx,
       +                funding_sat=amount,
       +                push_amt_sat=0,
       +                password=password)
                except Exception as e:
                    self.logger.exception("Problem opening channel")
                    self.app.show_error(_('Problem opening channel: ') + '\n' + repr(e))