[electrum] fix output parsing when pay-to field is empty
Summary:
This fixes two things:
- call self.win.lock_amount even when the "Max" button is checked when sending to multiple recipient (in that case it does not make sense for the amount field to be editable, the amounts must be specified on each destination line)
- only run the multi-recipient parsing code when the pay-to field has more than one line, and abort early when the field is empty, so that we don't unwillingly untoggle the "Max" button when we start editing the "Pay-to" filed
Inspired by:
https://github.com/spesmilo/electrum/commit/b16164da4f5c3fc9717073c7bda8e9618c29c5f2
https://github.com/spesmilo/electrum/commit/4bd4fc7697e118755af4d00579b1f2d1b08a63c9
This maybe also fixes T3600, although I have not been able to reproduce that exact bug yet because for me the accidental unchecking of the Max button causes the amount field to be cleared.
Test Plan:
Click max in the spend tab while the Pay To field is empty, make Electrum ABC loose focus (click on another top level window from another application), go back to Electrum ABC and click into the Pay-To field, check that the amount is not cleared.
Try the Send-To-Many feature, check that the Amount field is disabled, and check that the Max button is disabled unless one of the amounts is set to "!"
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Maniphest Tasks: T3600
Differential Revision: https://reviews.bitcoinabc.org/D17651