-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bip32: fix hardened char "h" vs "'" compatibility for some hw wallets
in particular, ledger: fix sign_message for some wallets ``` 156.02 | E | plugins.ledger.ledger | Traceback (most recent call last): File "...\electrum\electrum\plugins\ledger\ledger.py", line 1265, in sign_message result = base64.b64decode(self.client.sign_message(message, address_path)) File "...\Python310\site-packages\ledger_bitcoin\client.py", line 230, in sign_message sw, response = self._make_request(self.builder.sign_message(message_bytes, bip32_path), client_intepreter) File "...\Python310\site-packages\ledger_bitcoin\command_builder.py", line 176, in sign_message bip32_path: List[bytes] = bip32_path_from_string(bip32_path) File "...\Python310\site-packages\ledger_bitcoin\common.py", line 68, in bip32_path_from_string return [int(p).to_bytes(4, byteorder="big") if "'" not in p File "...\Python310\site-packages\ledger_bitcoin\common.py", line 68, in <listcomp> return [int(p).to_bytes(4, byteorder="big") if "'" not in p ValueError: invalid literal for int() with base 10: '84h' ``` Regression from df2bd61, where the default hardened char was changed from "'" to "h". Note that there was no corresponding wallet db upgrade, so some files use one char and others use the other.
- Loading branch information
1 parent
9e1bb94
commit 499f515
Showing
5 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters