Browse Source

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
3.2.x
SomberNight 7 years ago
parent
commit
6298e9b458
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 4
      lib/wallet.py

4
lib/wallet.py

@ -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[:])

Loading…
Cancel
Save