thww: select_device: only update label/dev_id after pairing succeeds - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit e1996bde01edbae2619915eb216ede0639765946 (DIR) parent 4ef313a1acfb0be1045c9d81b5e02ae1e9be5c50 (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Wed, 8 Apr 2020 16:50:55 +0200 hww: select_device: only update label/dev_id after pairing succeeds Diffstat: M electrum/plugin.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) --- (DIR) diff --git a/electrum/plugin.py b/electrum/plugin.py t@@ -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 t@@ -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