1
0

json_db: exempt keystore from StoredDict conversion

The keystore logic would need to be significantly changed to nicely
interoperate with StoredDict/json_db logic.
(just see KeyStore.__init__() and KeyStore.dump())
For now we exempt the keystore from the recursive StoredDict conversion, as
it is a smaller change that is also easier to review for correctness.

fixes #6066
fixes #6401

also reverts 2d3c2eeea9 (which was an even hackier workaround for #6066)
This commit is contained in:
SomberNight
2020-09-04 16:11:01 +02:00
parent 8dc3fadd13
commit a7199696d3
5 changed files with 14 additions and 4 deletions

View File

@@ -521,7 +521,7 @@ class BitBox02_KeyStore(Hardware_KeyStore):
device = "BitBox02"
plugin: "BitBox02Plugin"
def __init__(self, d: StoredDict):
def __init__(self, d: dict):
super().__init__(d)
self.force_watching_only = False
self.ux_busy = False

View File

@@ -255,7 +255,6 @@ 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)