mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
hardware wallets: detect if label changed and update it in wallet file
This commit is contained in:
parent
56c3de0e1e
commit
cbd146ad15
1 changed files with 5 additions and 2 deletions
|
@ -45,7 +45,7 @@ from .logging import Logger
|
|||
|
||||
if TYPE_CHECKING:
|
||||
from .transaction import Transaction, PartialTransaction, PartialTxInput, PartialTxOutput
|
||||
from .plugins.hw_wallet import HW_PluginBase
|
||||
from .plugins.hw_wallet import HW_PluginBase, HardwareClientBase
|
||||
|
||||
|
||||
class KeyStore(Logger):
|
||||
|
@ -703,7 +703,7 @@ class Hardware_KeyStore(KeyStore, Xpub):
|
|||
def ready_to_sign(self):
|
||||
return super().ready_to_sign() and self.has_usable_connection_with_device()
|
||||
|
||||
def opportunistically_fill_in_missing_info_from_device(self, client):
|
||||
def opportunistically_fill_in_missing_info_from_device(self, client: 'HardwareClientBase'):
|
||||
assert client is not None
|
||||
if self._root_fingerprint is None:
|
||||
# digitalbitbox (at least) does not reveal xpubs corresponding to unhardened paths
|
||||
|
@ -712,6 +712,9 @@ class Hardware_KeyStore(KeyStore, Xpub):
|
|||
root_fingerprint = BIP32Node.from_xkey(child_of_root_xpub).fingerprint.hex().lower()
|
||||
self._root_fingerprint = root_fingerprint
|
||||
self.is_requesting_to_be_rewritten_to_wallet_file = True
|
||||
if self.label != client.label():
|
||||
self.label = client.label()
|
||||
self.is_requesting_to_be_rewritten_to_wallet_file = True
|
||||
|
||||
|
||||
def bip39_normalize_passphrase(passphrase):
|
||||
|
|
Loading…
Add table
Reference in a new issue