mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
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
This commit is contained in:
parent
36ddb68384
commit
6298e9b458
1 changed files with 3 additions and 1 deletions
|
@ -1266,7 +1266,9 @@ class Abstract_Wallet(PrintError):
|
||||||
outputs[i_max] = (_type, data, 0)
|
outputs[i_max] = (_type, data, 0)
|
||||||
tx = Transaction.from_io(inputs, outputs[:])
|
tx = Transaction.from_io(inputs, outputs[:])
|
||||||
fee = fee_estimator(tx.estimated_size())
|
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)
|
outputs[i_max] = (_type, data, amount)
|
||||||
tx = Transaction.from_io(inputs, outputs[:])
|
tx = Transaction.from_io(inputs, outputs[:])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue