mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 01:35:20 +00:00
hww: select_device: only update label/dev_id after pairing succeeds
This commit is contained in:
parent
4ef313a1ac
commit
e1996bde01
1 changed files with 2 additions and 6 deletions
|
@ -485,6 +485,7 @@ class DeviceMgr(ThreadJob):
|
||||||
if client:
|
if client:
|
||||||
handler.update_status(True)
|
handler.update_status(True)
|
||||||
if client:
|
if client:
|
||||||
|
# note: if select_device was called, we might also update label etc here:
|
||||||
keystore.opportunistically_fill_in_missing_info_from_device(client)
|
keystore.opportunistically_fill_in_missing_info_from_device(client)
|
||||||
self.logger.info("end client for keystore")
|
self.logger.info("end client for keystore")
|
||||||
return client
|
return client
|
||||||
|
@ -621,12 +622,7 @@ class DeviceMgr(ThreadJob):
|
||||||
if c is None:
|
if c is None:
|
||||||
raise UserCancelled()
|
raise UserCancelled()
|
||||||
info = infos[c]
|
info = infos[c]
|
||||||
# save new label / soft_device_id
|
# note: updated label/soft_device_id will be saved after pairing succeeds
|
||||||
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()
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
@with_scan_lock
|
@with_scan_lock
|
||||||
|
|
Loading…
Add table
Reference in a new issue