electrum

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

commit ca6654c10234e1d3ded7ff0c6b1f42fa25438010
parent 710e9621b5ec2257d92538ae26dd33ff48aa86da
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 19 Nov 2019 20:26:50 +0100

qt send tab: don't allow paying multiple invoices that spend max '!'

Diffstat:
Melectrum/gui/qt/main_window.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -1490,11 +1490,14 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): outputs=outputs, fee=fee_est, is_sweep=is_sweep) + output_values = [x.value for x in outputs] + if output_values.count('!') > 1: + self.show_error(_("More than one output set to spend max")) + return if self.config.get('advanced_preview'): self.preview_tx_dialog(make_tx, outputs, external_keypairs=external_keypairs, invoice=invoice) return - output_values = [x.value for x in outputs] output_value = '!' if '!' in output_values else sum(output_values) d = ConfirmTxDialog(self, make_tx, output_value, is_sweep) d.update_tx()