Browse Source
keystore: add workaround for StoredDict issue #6066
note: not a proper fix... but works for now
hard-fail-on-bad-server-string
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
4 additions and
1 deletions
-
electrum/keystore.py
-
electrum/plugins/ledger/ledger.py
|
|
@ -49,6 +49,7 @@ from .logging import Logger |
|
|
|
if TYPE_CHECKING: |
|
|
|
from .gui.qt.util import TaskThread |
|
|
|
from .plugins.hw_wallet import HW_PluginBase, HardwareClientBase, HardwareHandlerBase |
|
|
|
from .wallet_db import WalletDB |
|
|
|
|
|
|
|
|
|
|
|
class KeyStore(Logger, ABC): |
|
|
@ -886,8 +887,9 @@ def hardware_keystore(d) -> Hardware_KeyStore: |
|
|
|
raise WalletFileException(f'unknown hardware type: {hw_type}. ' |
|
|
|
f'hw_keystores: {list(hw_keystores)}') |
|
|
|
|
|
|
|
def load_keystore(db, name) -> KeyStore: |
|
|
|
def load_keystore(db: 'WalletDB', name: str) -> KeyStore: |
|
|
|
d = db.get(name, {}) |
|
|
|
d = dict(d) # convert to dict from StoredDict (see #6066) |
|
|
|
t = d.get('type') |
|
|
|
if not t: |
|
|
|
raise WalletFileException( |
|
|
|
|
|
@ -229,6 +229,7 @@ class Ledger_KeyStore(Hardware_KeyStore): |
|
|
|
self.force_watching_only = False |
|
|
|
self.signing = False |
|
|
|
self.cfg = d.get('cfg', {'mode': 0}) |
|
|
|
self.cfg = dict(self.cfg) # convert to dict from StoredDict (see #6066) |
|
|
|
|
|
|
|
def dump(self): |
|
|
|
obj = Hardware_KeyStore.dump(self) |
|
|
|