Skip to content

Commit

Permalink
Update qtum electrum path
Browse files Browse the repository at this point in the history
  • Loading branch information
timemarkovqtum committed Oct 12, 2023
1 parent f0f8ecd commit 884f770
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/handler/get_extended_pubkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ static bool is_path_safe_for_pubkey_export(const uint32_t bip32_path[],
size_t bip32_path_len,
const uint32_t coin_types[],
size_t coin_types_length) {
// Exception for Electrum: it historically used "m/4541509h/1112098098h"
// Exception for Qtum Electrum: it historically used "m/44h/88h/4541509h/1112098098h"
// to derive encryption keys, so we whitelist it.
if (bip32_path_len == 2 && bip32_path[0] == (4541509 ^ H) &&
bip32_path[1] == (1112098098 ^ H)) {
if (bip32_path_len == 4 && bip32_path[0] == (44 ^ H) && bip32_path[1] == (88 ^ H) &&
bip32_path[2] == (4541509 ^ H) && bip32_path[3] == (1112098098 ^ H)) {
return true;
} else if (bip32_path_len == 2 && bip32_path[0] == (0 ^ H) && bip32_path[1] == (45342 ^ H)) {
// Exception for "m/0h/45342h"
Expand Down

0 comments on commit 884f770

Please sign in to comment.