Skip to content

Commit

Permalink
fix return model for fastapi (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc authored Jul 26, 2023
1 parent 3d676dd commit 4c1ff8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cashu/mint/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ async def check_fees(payload: CheckFeesRequest) -> CheckFeesResponse:
"/split",
name="Split",
summary="Split proofs at a specified amount",
response_model=PostSplitResponse,
response_model=Union[PostSplitResponse, PostSplitResponse_Deprecated],
response_description="A list of blinded signatures that can be used to create proofs.",
)
async def split(
Expand Down
2 changes: 1 addition & 1 deletion cashu/wallet/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async def invoice(ctx: Context, amount: int, hash: str, split: int):
print(" Invoice paid.")
except Exception as e:
# TODO: user error codes!
if "invoice not paid" in str(e):
if "not paid" in str(e):
print(".", end="", flush=True)
continue
else:
Expand Down
2 changes: 1 addition & 1 deletion cashu/wallet/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def raise_on_error(resp: Response) -> None:
"""
resp_dict = resp.json()
if "detail" in resp_dict:
logger.error(f"Error from mint: {resp_dict}")
logger.trace(f"Error from mint: {resp_dict}")
error_message = f"Mint Error: {resp_dict['detail']}"
if "code" in resp_dict:
error_message += f" (Code: {resp_dict['code']})"
Expand Down

0 comments on commit 4c1ff8b

Please sign in to comment.