Fix signing with path m key (#10009)

This commit is contained in:
Matt Hauff 2022-01-28 16:34:39 -07:00 committed by GitHub
parent b8ada1ceb7
commit fa2cdd6492
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ def derive_sk_from_hd_path(master_sk: PrivateKey, hd_path_root: str) -> Tuple[Pr
path = path[1:] # Skip "m"
if path[-1] == "": # remove trailing slash
if len(path) > 0 and path[-1] == "": # remove trailing slash
path = path[:-1]
index_and_derivation_types: List[Tuple[int, DerivationType]] = []