From 061305cd97bdee5b09e12fad831497e7e205df06 Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Wed, 15 Jul 2020 13:13:03 +0200 Subject: [PATCH] bitbox02: add fingerprint to label See comment in commit. --- electrum/plugins/bitbox02/bitbox02.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/electrum/plugins/bitbox02/bitbox02.py b/electrum/plugins/bitbox02/bitbox02.py index 3f1235aa9..e3f43ec46 100644 --- a/electrum/plugins/bitbox02/bitbox02.py +++ b/electrum/plugins/bitbox02/bitbox02.py @@ -251,7 +251,12 @@ class BitBox02Client(HardwareClientBase): return super().label() if self.bitbox02_device is None: self.pairing_dialog() - return self.bitbox02_device.device_info()["name"] + # We add the fingerprint to the label, as if there are two devices with the same label, the + # device manager can mistake one for another and fail. + return "%s (%s)" % ( + self.bitbox02_device.device_info()["name"], + self.bitbox02_device.root_fingerprint().hex(), + ) def request_root_fingerprint_from_device(self) -> str: if self.bitbox02_device is None: