Browse Source

hww: select_device: only update label/dev_id after pairing succeeds

hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
e1996bde01
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 8
      electrum/plugin.py

8
electrum/plugin.py

@ -485,6 +485,7 @@ class DeviceMgr(ThreadJob):
if client:
handler.update_status(True)
if client:
# note: if select_device was called, we might also update label etc here:
keystore.opportunistically_fill_in_missing_info_from_device(client)
self.logger.info("end client for keystore")
return client
@ -621,12 +622,7 @@ class DeviceMgr(ThreadJob):
if c is None:
raise UserCancelled()
info = infos[c]
# save new label / soft_device_id
keystore.set_label(info.label)
keystore.soft_device_id = info.soft_device_id
wallet = handler.get_wallet()
if wallet is not None:
wallet.save_keystore()
# note: updated label/soft_device_id will be saved after pairing succeeds
return info
@with_scan_lock

Loading…
Cancel
Save