electrum

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

commit a161b6e6556dab35e01ab2607f8a9332d7db2c75
parent 0be73ed546abbffd35856311c30f1cad841f5d0c
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 24 Apr 2018 15:30:13 +0200

RBF: make sure we know the fee for the old txn

related #4306

Diffstat:
Mgui/kivy/uix/dialogs/tx_dialog.py | 3+++
Mgui/qt/history_list.py | 3++-
Mgui/qt/main_window.py | 3+++
3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/gui/kivy/uix/dialogs/tx_dialog.py b/gui/kivy/uix/dialogs/tx_dialog.py @@ -135,6 +135,9 @@ class TxDialog(Factory.Popup): def do_rbf(self): from .bump_fee_dialog import BumpFeeDialog is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(self.tx) + if fee is None: + self.app.show_error(_("Can't bump fee: unknown fee for original transaction.")) + return size = self.tx.estimated_size() d = BumpFeeDialog(self.app, fee, size, self._do_rbf) d.open() diff --git a/gui/qt/history_list.py b/gui/qt/history_list.py @@ -345,7 +345,8 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): lambda bound_c=c: self.editItem(item, bound_c)) menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx)) if is_unconfirmed and tx: - rbf = is_mine and not tx.is_final() + # note: the current implementation of RBF *needs* the old tx fee + rbf = is_mine and not tx.is_final() and fee is not None if rbf: menu.addAction(_("Increase fee"), lambda: self.parent.bump_fee_dialog(tx)) else: diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -3138,6 +3138,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def bump_fee_dialog(self, tx): is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(tx) + if fee is None: + self.show_error(_("Can't bump fee: unknown fee for original transaction.")) + return tx_label = self.wallet.get_label(tx.txid()) tx_size = tx.estimated_size() d = WindowModalDialog(self, _('Bump Fee'))