mirror of
https://github.com/aljazceru/nutshell.git
synced 2026-02-02 23:34:21 +01:00
Fix/multimind_redeem_unused_keysets (#108)
* multmind fix * bump version * fix verify_mints
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -66,4 +66,4 @@ NOSTR_RELAYS = env.list(
|
||||
)
|
||||
|
||||
MAX_ORDER = 64
|
||||
VERSION = "0.9.0"
|
||||
VERSION = "0.9.1"
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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"
|
||||
|
||||
2
setup.py
2
setup.py
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user