1
0

Call pairing dialog when necessary, fixes #8970

This commit is contained in:
Nicolas Kuttler
2024-03-21 21:32:42 +01:00
committed by SomberNight
parent 8ca1bdedc4
commit f755b690d8

View File

@@ -202,6 +202,14 @@ class BitBox02Client(HardwareClientBase):
@runs_in_hwd_thread
def get_password_for_storage_encryption(self) -> str:
if self.bitbox02_device is None:
self.pairing_dialog()
if self.bitbox02_device is None:
raise Exception(
"Need to setup communication first before attempting any BitBox02 calls"
)
derivation = get_derivation_used_for_hw_device_encryption()
derivation_list = bip32.convert_bip32_strpath_to_intpath(derivation)
xpub = self.bitbox02_device.electrum_encryption_key(derivation_list)