Skip to content

Commit

Permalink
make new flags optional for backwards compat
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Mar 8, 2025
1 parent f777f32 commit 2c68b9c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cashu/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ class PostMintQuoteRequest(BaseModel):
class PostMintQuoteResponse(BaseModel):
quote: str # quote id
request: str # input payment request
amount: Optional[int] # output amount (optional for backwards compat)
unit: Optional[str] # output unit (optional for backwards compat)
amount: Optional[int] # output amount (optional for backwards compat pre 0.16.6)
unit: Optional[str] # output unit (optional for backwards compat pre 0.16.6)
state: Optional[str] # state of the quote (optional for backwards compat)
expiry: Optional[int] # expiry of the quote
pubkey: Optional[str] = None # NUT-20 quote lock pubkey
Expand Down Expand Up @@ -224,8 +224,10 @@ def mpp_amount(self) -> int:
class PostMeltQuoteResponse(BaseModel):
quote: str # quote id
amount: int # input amount
unit: Optional[str] # input unit (optional for backwards compat)
request: Optional[str] # output payment request (optional for backwards compat)
unit: Optional[str] # input unit (optional for backwards compat pre 0.16.6)
request: Optional[
str
] # output payment request (optional for backwards compat pre 0.16.6)
fee_reserve: int # input fee reserve
paid: Optional[bool] = (
None # whether the request has been paid # DEPRECATED as per NUT PR #136
Expand Down

0 comments on commit 2c68b9c

Please sign in to comment.