HomePhabricator

[electrum] show a single popup dialog when broadcasting multiple transactions

Description

[electrum] show a single popup dialog when broadcasting multiple transactions

Summary:
Until now, the program used to open one popup per transaction when broadcasting multiple transactions, which can be annoying when broadcasting many transactions.
Fix this by summarizing the result of the broadcast in a single messagebox.

ref T3352

This has also the benefit of no longer using the main_window.broadcast_transaction method, which could have side effects if the user was in the middle of dealing with a payment request before deciding to send broadcast a bunch of unrelated transactions.

Test Plan:
Prepare a few signed and non-conflicting signed transactions, save them to file. Load them via "Tools > Load transaction > From multiple files". Click broadcast.

Repeat the test but add a conflicting transaction (spend the same coin to a different address) to trigger the partial success code path.

Create 3 conflicting transactions. Broadcast one of them. Then try to broadcast the other 2 to test the "complete_failure" code path.

Patch the code to raise an error in MultiTransactionsWidget.broadcast_transactions to trigger the on_broadcast_error method.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Maniphest Tasks: T3352

Differential Revision: https://reviews.bitcoinabc.org/D14853

Details

Provenance
PiRKAuthored on Nov 25 2023, 09:53
PiRKPushed on Nov 28 2023, 10:35
Reviewer
Restricted Project
Differential Revision
D14853: [electrum] show a single popup dialog when broadcasting multiple transactions
Parents
rABCdf1a69cc757f: [chronik hotfix] use chronik.be.cash servers for live apps
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task