mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
qt send tab: don't allow paying multiple invoices that spend max '!'
This commit is contained in:
parent
710e9621b5
commit
ca6654c102
1 changed files with 4 additions and 1 deletions
|
@ -1490,11 +1490,14 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
|
||||||
outputs=outputs,
|
outputs=outputs,
|
||||||
fee=fee_est,
|
fee=fee_est,
|
||||||
is_sweep=is_sweep)
|
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'):
|
if self.config.get('advanced_preview'):
|
||||||
self.preview_tx_dialog(make_tx, outputs, external_keypairs=external_keypairs, invoice=invoice)
|
self.preview_tx_dialog(make_tx, outputs, external_keypairs=external_keypairs, invoice=invoice)
|
||||||
return
|
return
|
||||||
|
|
||||||
output_values = [x.value for x in outputs]
|
|
||||||
output_value = '!' if '!' in output_values else sum(output_values)
|
output_value = '!' if '!' in output_values else sum(output_values)
|
||||||
d = ConfirmTxDialog(self, make_tx, output_value, is_sweep)
|
d = ConfirmTxDialog(self, make_tx, output_value, is_sweep)
|
||||||
d.update_tx()
|
d.update_tx()
|
||||||
|
|
Loading…
Add table
Reference in a new issue