diff --git a/cashu/wallet/cli.py b/cashu/wallet/cli.py index 3b7138e..43e6744 100644 --- a/cashu/wallet/cli.py +++ b/cashu/wallet/cli.py @@ -387,7 +387,7 @@ async def receive(ctx, token: str, lock: str): # deserialize token dtoken = json.loads(base64.urlsafe_b64decode(token)) - assert "tokens" in dtoken, Exception("no proofs in token") + assert "proofs" in dtoken, Exception("no proofs in token") includes_mint_info: bool = "mints" in dtoken and dtoken.get("mints") is not None # if there is a `mints` field in the token @@ -402,7 +402,7 @@ async def receive(ctx, token: str, lock: str): await wallet.load_proofs() else: # no mint information present, we extract the proofs and use wallet's default mint - proofs = [Proof(**p) for p in dtoken["tokens"]] + proofs = [Proof(**p) for p in dtoken["proofs"]] _, _ = await wallet.redeem(proofs, script, signature) wallet.status() diff --git a/cashu/wallet/cli_helpers.py b/cashu/wallet/cli_helpers.py index df7162f..b4ba620 100644 --- a/cashu/wallet/cli_helpers.py +++ b/cashu/wallet/cli_helpers.py @@ -63,7 +63,7 @@ async def redeem_multimint(ctx, dtoken, script, signature): # redeem proofs of this keyset redeem_proofs = [ - Proof(**p) for p in dtoken["tokens"] if Proof(**p).id == keyset + Proof(**p) for p in dtoken["proofs"] if Proof(**p).id == keyset ] _, _ = await keyset_wallet.redeem( redeem_proofs, scnd_script=script, scnd_siganture=signature