1
0

wallet: stricter validation in export_private_key

fixes #5422
This commit is contained in:
SomberNight
2019-06-12 18:09:38 +02:00
parent c7b64f4794
commit 9e21b76c91
4 changed files with 62 additions and 8 deletions

View File

@@ -200,6 +200,8 @@ class BIP32Node(NamedTuple):
return isinstance(self.eckey, ecc.ECPrivkey)
def subkey_at_private_derivation(self, path: Union[str, Iterable[int]]) -> 'BIP32Node':
if path is None:
raise Exception("derivation path must not be None")
if isinstance(path, str):
path = convert_bip32_path_to_list_of_uint32(path)
if not self.is_private():
@@ -224,6 +226,8 @@ class BIP32Node(NamedTuple):
child_number=child_number)
def subkey_at_public_derivation(self, path: Union[str, Iterable[int]]) -> 'BIP32Node':
if path is None:
raise Exception("derivation path must not be None")
if isinstance(path, str):
path = convert_bip32_path_to_list_of_uint32(path)
if not path: