Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Oct 7, 2023
1 parent b1cbb50 commit 8ef94cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cashu/mint/ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ async def mint(
id: Optional[str] = None,
keyset: Optional[MintKeyset] = None,
) -> List[BlindedSignature]:
"""Mints new coins if payment `id` was successful. Ingest blind messages `outputs` and returns blind signatures `promises`.
"""Mints new coins if payment `id` was made. Ingest blind messages `outputs` and returns blind signatures `promises`.
Args:
outputs (List[BlindedMessage]): Outputs (blinded messages) to sign.
Expand Down
2 changes: 1 addition & 1 deletion cashu/mint/router_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def mint_deprecated(
hash = payment_hash or hash
# END: backwards compatibility < 0.12

promises = await ledger.mint(payload.outputs, id=hash)
promises = await ledger.mint(outputs=payload.outputs, id=hash)
blinded_signatures = PostMintResponse(promises=promises)
logger.trace(f"< POST /mint: {blinded_signatures}")
return blinded_signatures
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mint.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def test_mint(ledger: Ledger):
B_="02634a2c2b34bec9e8a4aba4361f6bf202d7fa2365379b0840afe249a7a9d71239",
)
]
promises = await ledger.mint(blinded_messages_mock, hash=payment_hash)
promises = await ledger.mint(outputs=blinded_messages_mock, id=payment_hash)
assert len(promises)
assert promises[0].amount == 8
assert (
Expand All @@ -103,7 +103,7 @@ async def test_mint_invalid_blinded_message(ledger: Ledger):
)
]
await assert_err(
ledger.mint(blinded_messages_mock_invalid_key, hash=payment_hash),
ledger.mint(outputs=blinded_messages_mock_invalid_key, id=payment_hash),
"invalid public key",
)

Expand Down

0 comments on commit 8ef94cc

Please sign in to comment.