Skip to content

Commit

Permalink
fix up comment
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Jan 18, 2025
1 parent 5c8ab19 commit a042446
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cashu/mint/db/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def _unset_mint_quote_pending(
raise TransactionError(
f"Mint quote not pending: {quote.state.value}. Cannot set as {state.value}."
)
# set the quote as pending
# set the quote to previous state
quote.state = state
logger.trace(f"crud: setting quote {quote_id} as {state.value}")
await self.crud.update_mint_quote(quote=quote, db=self.db, conn=conn)
Expand Down Expand Up @@ -196,7 +196,6 @@ async def _set_melt_quote_pending(
raise TransactionError("Melt quote already pending.")
# set the quote as pending
quote_copy.state = MeltQuoteState.pending

if outputs:
quote_copy.outputs = outputs
await self.crud.update_melt_quote(quote=quote_copy, db=self.db, conn=conn)
Expand All @@ -223,7 +222,7 @@ async def _unset_melt_quote_pending(
raise TransactionError("Melt quote not found.")
if quote_db.state != MeltQuoteState.pending:
raise TransactionError("Melt quote not pending.")
# set the quote as pending
# set the quote to previous state
quote_copy.state = state

# unset outputs
Expand Down

0 comments on commit a042446

Please sign in to comment.