HomePhabricator

[electrum] fix get_tx_derivations for regular keystores and imported keys…

Description

[electrum] fix get_tx_derivations for regular keystores and imported keys keystores

Summary:
In D14569 I forgot to make sure that keystores also provided pubkeys as bytes in keypairs. As a result, I broke transaction signing for most wallet types.

Fix this by making get_tx_derivations return pubkeys as bytes. These returned pubkeys are then used in SoftwareKeyStore.sign_transaction to build the keypairs before calling tx.sign, and now they are in the correct type.

For ImportedKeyStore, fix the get_pubkey_derivation method to correctly deal with x_pubkey as bytes. This was missed in D14455

Test Plan:
python test_runner.py

Send a transaction with the software for a regular BIP39 wallet, a multisig wallet, a hardware wallet and an imported privkey wallet

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
PiRKAuthored on Oct 4 2023, 07:36
PiRKPushed on Oct 4 2023, 11:36
Reviewer
Restricted Project
Differential Revision
D14592: [electrum] fix get_tx_derivations for regular keystores and imported keys keystores
Parents
rABC5cd4d404df97: refactor: Post-"Chainstate loading sequence coalescence" fixups
Branches
Unknown
Tags
Unknown