Page MenuHomePhabricator

[electrum] fix or remove hooks in send_tab
ClosedPublic

Authored by PiRK on Mon, Dec 1, 10:20.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC2079984a732a: [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.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK published this revision for review.Mon, Dec 1, 10:56

test plan succeeded (i was waiting for a fusion round)

This revision is now accepted and ready to land.Mon, Dec 1, 11:25
This revision was automatically updated to reflect the committed changes.