diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index d4d285008..29921cd05 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -2746,17 +2746,30 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): feebox_cb.stateChanged.connect(on_feebox) fee_widgets.append((feebox_cb, None)) + use_rbf = self.config.get('use_rbf', True) use_rbf_cb = QCheckBox(_('Use Replace-By-Fee')) - use_rbf_cb.setChecked(self.config.get('use_rbf', True)) + use_rbf_cb.setChecked(use_rbf) use_rbf_cb.setToolTip( _('If you check this box, your transactions will be marked as non-final,') + '\n' + \ _('and you will have the possibility, while they are unconfirmed, to replace them with transactions that pay higher fees.') + '\n' + \ _('Note that some merchants do not accept non-final transactions until they are confirmed.')) def on_use_rbf(x): - self.config.set_key('use_rbf', x == Qt.Checked) + self.config.set_key('use_rbf', bool(x)) + batch_rbf_cb.setEnabled(bool(x)) use_rbf_cb.stateChanged.connect(on_use_rbf) fee_widgets.append((use_rbf_cb, None)) + batch_rbf_cb = QCheckBox(_('Batch RBF transactions')) + batch_rbf_cb.setChecked(self.config.get('batch_rbf', False)) + batch_rbf_cb.setEnabled(use_rbf) + batch_rbf_cb.setToolTip( + _('If you check this box, your unconfirmed transactios will be consolidated in a single transaction') + '\n' + \ + _('This will save fees.')) + def on_batch_rbf(x): + self.config.set_key('batch_rbf', bool(x)) + batch_rbf_cb.stateChanged.connect(on_batch_rbf) + fee_widgets.append((batch_rbf_cb, None)) + msg = _('OpenAlias record, used to receive coins and to sign payment requests.') + '\n\n'\ + _('The following alias providers are available:') + '\n'\ + '\n'.join(['https://cryptoname.co/', 'http://xmr.link']) + '\n\n'\ diff --git a/electrum/wallet.py b/electrum/wallet.py index 00b406106..61f51cd15 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -593,7 +593,7 @@ class Abstract_Wallet(AddressSynchronizer): coin_chooser = coinchooser.get_coin_chooser(config) # If there is an unconfirmed RBF tx, merge with it base_tx = self.get_unconfirmed_tx() - if base_tx and not base_tx.is_final(): + if config.get('batch_rbf', False) and base_tx and not base_tx.is_final(): base_tx = Transaction(base_tx.serialize()) base_tx.deserialize(force_full_parse=True) base_tx.remove_signatures()