tin Qt send tab, detect invalid multi-line payto when using "!": "insufficient funds" - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 6298e9b45898efcd16344dd113750b068c984821 DIR parent 36ddb6838413caeca041c0c2f7073a9cc770f258 HTML Author: SomberNight <somber.night@protonmail.com> Date: Thu, 14 Jun 2018 23:34:14 +0200 in Qt send tab, detect invalid multi-line payto when using "!": "insufficient funds" if the rest of the amounts (without the "!") are over the available funds; do the correct thing Diffstat: M lib/wallet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -1266,7 +1266,9 @@ class Abstract_Wallet(PrintError): outputs[i_max] = (_type, data, 0) tx = Transaction.from_io(inputs, outputs[:]) fee = fee_estimator(tx.estimated_size()) - amount = max(0, sendable - tx.output_value() - fee) + amount = sendable - tx.output_value() - fee + if amount < 0: + raise NotEnoughFunds() outputs[i_max] = (_type, data, amount) tx = Transaction.from_io(inputs, outputs[:])