Skip to content

Commit

Permalink
fix melt amount
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed May 23, 2024
1 parent c50107c commit ee4f4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions cashu/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class PostMeltQuoteRequest(BaseModel):
request: str = Field(
..., max_length=settings.mint_max_request_length
) # output payment request
amount: Optional[int] = Field(default=None, gt=0) # input amount


class PostMeltQuoteResponse(BaseModel):
Expand Down
6 changes: 2 additions & 4 deletions cashu/wallet/api/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,14 @@ async def send_command(
default=None,
description="Mint URL to send from (None for default mint)",
),
nosplit: bool = Query(
default=False, description="Do not split tokens before sending."
),
offline: bool = Query(default=False, description="Force offline send."),
):
global wallet
if mint:
wallet = await mint_wallet(mint)
if not nostr:
balance, token = await send(
wallet, amount=amount, lock=lock, legacy=False, split=not nosplit
wallet, amount=amount, lock=lock, legacy=False, offline=offline
)
return SendResponse(balance=balance, token=token)
else:
Expand Down

0 comments on commit ee4f4fb

Please sign in to comment.