HomePhabricator

[electrum] fix or remove hooks in send_tab

Description

[electrum] fix or remove hooks in send_tab

Summary:
Many of these hooks are currently unused by the Electrum ABC codebase, so just remove them so we prevent future plugins using them and putting their maintenance burden on us if we want to change our API.
Note that the "sign_tx" hook was already inconsistent between how it is called in send_tab.py and commands.py.

For the two hooks that are currently used (both by CashFusion code), change their signature to avoid letting plugins introduce dependencies on our MainWindow API. Pass the wallet, config and external keypairs directly.

Depends on D19009

Test Plan:
Grep all hook names, check for each one that there are no other broken run_hook("hook_name", ...) calls and no other broken @hook implementations

Go through all steps of a multisig tx.
Participate in a CashFusion round.

In a wallet that has both fused and unfused coins, go to the send tab, check that there is a "Spend only fused coins" checkbox. Click "Max", then toggle the "Spend only fused coins" option and see that the amount is changing.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Mon, Dec 1, 09:49
PiRKPushed on Mon, Dec 1, 11:38
Reviewer
Restricted Project
Differential Revision
D19010: [electrum] fix or remove hooks in send_tab
Parents
rABCeba54e1de99e: [electrum] fix transaction_dialog when creating a multisig partially signed…
Branches
Unknown
Tags
Unknown