Fix/multimind_redeem_unused_keysets (#108)

* multmind fix

* bump version

* fix verify_mints
This commit is contained in:
calle
2023-02-03 23:44:05 +01:00
committed by GitHub
parent 75662462b4
commit 53aa73b7c7
5 changed files with 10 additions and 6 deletions

View File

@@ -115,7 +115,7 @@ cashu info
Returns:
```bash
Version: 0.9.0
Version: 0.9.1
Debug: False
Cashu dir: /home/user/.cashu
Wallet: wallet

View File

@@ -66,4 +66,4 @@ NOSTR_RELAYS = env.list(
)
MAX_ORDER = 64
VERSION = "0.9.0"
VERSION = "0.9.1"

View File

@@ -29,10 +29,12 @@ async def verify_mints(ctx: Context, token: TokenV2):
if token.mints is None:
return
proofs_keysets = set([p.id for p in token.proofs])
logger.debug(f"Verifying mints")
trust_token_mints = True
for mint in token.mints:
for keyset in set(mint.ids):
for keyset in set([id for id in mint.ids if id in proofs_keysets]):
# init a temporary wallet object
keyset_wallet = Wallet(
mint.url, os.path.join(CASHU_DIR, ctx.obj["WALLET_NAME"])
@@ -77,8 +79,10 @@ async def redeem_multimint(ctx: Context, token: TokenV2, script, signature):
if token.mints is None:
return
proofs_keysets = set([p.id for p in token.proofs])
for mint in token.mints:
for keyset in set(mint.ids):
for keyset in set([id for id in mint.ids if id in proofs_keysets]):
logger.debug(f"Redeeming tokens from keyset {keyset}")
# init a temporary wallet object
keyset_wallet = Wallet(

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "cashu"
version = "0.9.0"
version = "0.9.1"
description = "Ecash wallet and mint."
authors = ["calle <callebtc@protonmail.com>"]
license = "MIT"

View File

@@ -13,7 +13,7 @@ entry_points = {"console_scripts": ["cashu = cashu.wallet.cli:cli"]}
setuptools.setup(
name="cashu",
version="0.9.0",
version="0.9.1",
description="Ecash wallet and mint for Bitcoin Lightning",
long_description=long_description,
long_description_content_type="text/markdown",