From 0ac9b38888bf71f6258ee7ae24184e4a9cf9d0ef Mon Sep 17 00:00:00 2001 From: timemarkovqtum Date: Thu, 12 Oct 2023 12:32:23 +0200 Subject: [PATCH] Update qtum electrum path --- src/handler/get_extended_pubkey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handler/get_extended_pubkey.c b/src/handler/get_extended_pubkey.c index 2f2f54b83..2258a3f08 100644 --- a/src/handler/get_extended_pubkey.c +++ b/src/handler/get_extended_pubkey.c @@ -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"