mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
bitbox02: implement get_soft_device_id so multisig runs more smoothly
Without it, if you have say a 1-of-2 multisig with two BitBox02s, you would run into trouble if the first keystore would try to match to the wrong inserted BitBox02 (wrong order, or the first one is not inserted, etc. ). With the soft device id, the device manager can figure it on its own which keystore belongs to which connected bb02.
This commit is contained in:
parent
995250948a
commit
106688ea54
1 changed files with 9 additions and 0 deletions
|
@ -85,6 +85,15 @@ class BitBox02Client(HardwareClientBase):
|
|||
return False
|
||||
return True
|
||||
|
||||
def get_soft_device_id(self) -> Optional[str]:
|
||||
if self.handler is None:
|
||||
# Can't do the pairing without the handler. This happens at wallet creation time, when
|
||||
# listing the devices.
|
||||
return None
|
||||
if self.bitbox02_device is None:
|
||||
self.pairing_dialog(wizard=False)
|
||||
return self.bitbox02_device.root_fingerprint().hex()
|
||||
|
||||
def pairing_dialog(self, wizard: bool = True):
|
||||
def pairing_step(code: str, device_response: Callable[[], bool]) -> bool:
|
||||
msg = "Please compare and confirm the pairing code on your BitBox02:\n" + code
|
||||
|
|
Loading…
Add table
Reference in a new issue