1
0

keystore: cache derive_pubkey

This commit is contained in:
SomberNight
2019-12-09 03:35:20 +01:00
parent 5f6f7da2a1
commit f73b6b5d23
3 changed files with 14 additions and 8 deletions

View File

@@ -178,7 +178,7 @@ def get_connected_hw_devices(plugins):
return devices
def get_password_for_hw_device_encrypted_storage(plugins):
def get_password_for_hw_device_encrypted_storage(plugins) -> str:
devices = get_connected_hw_devices(plugins)
if len(devices) == 0:
print_msg("Error: No connected hw device found. Cannot decrypt this wallet.")
@@ -194,7 +194,7 @@ def get_password_for_hw_device_encrypted_storage(plugins):
xpub = plugin.get_xpub(device_info.device.id_, derivation, 'standard', plugin.handler)
except UserCancelled:
sys.exit(0)
password = keystore.Xpub.get_pubkey_from_xpub(xpub, ())
password = keystore.Xpub.get_pubkey_from_xpub(xpub, ()).hex()
return password