diff --git a/my_scratch.py b/my_scratch.py index 5a77972..7a2dfa8 100644 --- a/my_scratch.py +++ b/my_scratch.py @@ -41,7 +41,7 @@ async def get_key() -> str: encrypter=my_enc) # await new_store.add(NamedKeys('moobs')) - await new_store.delete('zoddy') + await new_store.delete('monty') for c_k in await new_store.select(): print(c_k) diff --git a/src/monstr/ident/keystore.py b/src/monstr/ident/keystore.py index e6f81f0..525bafe 100644 --- a/src/monstr/ident/keystore.py +++ b/src/monstr/ident/keystore.py @@ -258,13 +258,11 @@ async def save(self, file_name: str = None): writer = csv.writer(csvfile, delimiter=',') kv: NamedKeys for name in self._store: - k = self._store[name] - kv = k.private_key_bech32() - if kv is None: - kv = k.private_key_bech32() + kv = self._store[name] + k = await self.get_store_key(kv, self._encrypter) writer.writerow([ - k.name, kv + kv.name, k ]) async def load(self, file_name: str = None):