diff --git a/README.md b/README.md index 0b1d8ae..29b71c2 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ cashu info Returns: ```bash -Version: 0.9.3 +Version: 0.9.4 Debug: False Cashu dir: /home/user/.cashu Wallet: wallet diff --git a/cashu/core/settings.py b/cashu/core/settings.py index f11da43..5d76efb 100644 --- a/cashu/core/settings.py +++ b/cashu/core/settings.py @@ -66,4 +66,4 @@ NOSTR_RELAYS = env.list( ) MAX_ORDER = 64 -VERSION = "0.9.3" +VERSION = "0.9.4" diff --git a/cashu/wallet/__init__.py b/cashu/wallet/__init__.py index b4cdb6a..3a33a17 100644 --- a/cashu/wallet/__init__.py +++ b/cashu/wallet/__init__.py @@ -1,3 +1,11 @@ import sys sys.tracebacklimit = None # type: ignore + +from loguru import logger + +from cashu.core.settings import DEBUG + +# configure logger +logger.remove() +logger.add(sys.stderr, level="DEBUG" if DEBUG else "INFO") diff --git a/cashu/wallet/wallet.py b/cashu/wallet/wallet.py index 7923e71..bedb19d 100644 --- a/cashu/wallet/wallet.py +++ b/cashu/wallet/wallet.py @@ -157,6 +157,10 @@ class LedgerAPI: await store_keyset(keyset=keyset, db=self.db) self.keys = keyset + assert self.keys.public_keys + self.public_keys = self.keys.public_keys + assert self.keys.id + self.keyset_id = self.keys.id logger.debug(f"Current mint keyset: {self.keys.id}") return self.keys @@ -184,11 +188,6 @@ class LedgerAPI: if keyset_id: assert keyset_id in self.keysets, f"keyset {keyset_id} not active on mint" - assert self.keys.public_keys - self.public_keys = self.keys.public_keys - assert self.keys.id - self.keyset_id = self.keys.id - @staticmethod def _construct_outputs(amounts: List[int], secrets: List[str]): """Takes a list of amounts and secrets and returns outputs. diff --git a/pyproject.toml b/pyproject.toml index b9a4651..d6eb505 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cashu" -version = "0.9.3" +version = "0.9.4" description = "Ecash wallet and mint." authors = ["calle "] license = "MIT" diff --git a/setup.py b/setup.py index e135275..320c90b 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ entry_points = {"console_scripts": ["cashu = cashu.wallet.cli.cli:cli"]} setuptools.setup( name="cashu", - version="0.9.3", + version="0.9.4", description="Ecash wallet and mint for Bitcoin Lightning", long_description=long_description, long_description_content_type="text/markdown",