electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 47e0b4cd02a31d4bb7290aa56b1cc0246e16df06
parent 6b9971a4666bd3bbd0cd16ea6c4f8e88f40fc878
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 18 Nov 2019 05:12:13 +0100

fix #5765

Diffstat:
Melectrum/gui/qt/main_window.py | 5+----
Melectrum/lnutil.py | 4++--
2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -1394,10 +1394,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): amount_sat = self.amount_e.get_amount() attempts = LN_NUM_PAYMENT_ATTEMPTS def task(): - try: - self.wallet.lnworker.pay(invoice, amount_sat, attempts) - except Exception as e: - self.show_error(str(e)) + self.wallet.lnworker.pay(invoice, amount_sat, attempts) self.do_clear() self.wallet.thread.add(task) self.invoice_list.update() diff --git a/electrum/lnutil.py b/electrum/lnutil.py @@ -8,7 +8,7 @@ from collections import namedtuple from typing import NamedTuple, List, Tuple, Mapping, Optional, TYPE_CHECKING, Union, Dict, Set import re -from .util import bfh, bh2u, inv_dict +from .util import bfh, bh2u, inv_dict, UserFacingException from .crypto import sha256 from .transaction import (Transaction, PartialTransaction, PartialTxInput, TxOutpoint, PartialTxOutput, opcodes, TxOutput) @@ -118,13 +118,13 @@ class LightningError(Exception): pass class LightningPeerConnectionClosed(LightningError): pass class UnableToDeriveSecret(LightningError): pass class HandshakeFailed(LightningError): pass -class PaymentFailure(LightningError): pass class ConnStringFormatError(LightningError): pass class UnknownPaymentHash(LightningError): pass class RemoteMisbehaving(LightningError): pass class NotFoundChanAnnouncementForUpdate(Exception): pass +class PaymentFailure(UserFacingException): pass # TODO make some of these values configurable? DEFAULT_TO_SELF_DELAY = 144