Fix Timelock Recovery plugin for watch wallets
In watch-wallets (i.e. air-gapped solutions), the transactions can be signed by clicking the View button, exporting the PSBT, loading and signing it on a different device, and then merging the signature.
Added assertions that all the transactions are completed before moving to the final window (for downloading PDFs and JSONs).
Is there a reason for the extra check on parse_output? This looks to be already covered by the check right above it.
https://github.com/spesmilo/electrum/blob/e30392cd161de8dfcf5981c4d528f82efd4645c3/electrum/plugins/timelock_recovery/qt.py#L408-L412
@accumulator You're right, it's redundant.
I think I wrote it before I wrote the or pi.type != PaymentIdentifierType.SPK or not pi.spk_is_address part.
I'll replace it with a simple assert just in case.
I cherry-picked a slightly changed version of your last commit to master, in 2c7afacbe1913241e6cc319131c6913ada06a06d
@accumulator Great, I've removed my commit and rebased the branch.
Tested, works fine for me with a regular singlesig and a watchonly wallet. One comment on the code (see above).
Two things i noticed could may be done to improve UX a bit (unrelated to this PR), adding a MIN/MAX button to the Cancellation time-window (days) field as the help text is a bit hidden, this would make it more intuitive to figure out the limits instead of brute forcing the input field until it turns red.
And wrapping the PDF saving call into a WaitingDialog as it blocks the GUI for a couple of seconds which would feel better if it gave some feedback (especially on slow computers).
@f321x Thanks. Fixed and rebased from master branch.
Thx.