Skip to content

Commit

Permalink
remove mint_quote_signature_required as per spec
Browse files Browse the repository at this point in the history
  • Loading branch information
lollerfirst committed Dec 7, 2024
1 parent 34aa46c commit b43c01a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,3 @@ LIGHTNING_RESERVE_FEE_MIN=2000
# MINT_GLOBAL_RATE_LIMIT_PER_MINUTE=60
# Determines the number of transactions (mint, melt, swap) allowed per minute per IP
# MINT_TRANSACTION_RATE_LIMIT_PER_MINUTE=20

# --------- MINT FEATURES ---------
# Require NUT-19 signature for mint quotes
MINT_QUOTE_SIGNATURE_REQUIRED=FALSE
2 changes: 1 addition & 1 deletion cashu/core/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self):
super().__init__(self.detail, code=2001)

class QuoteInvalidWitnessError(CashuError):
detail = "Witness on mint request not provided or invalid"
detail = "Signature for mint request invalid"
code = 20008

def __init__(self):
Expand Down
1 change: 0 additions & 1 deletion cashu/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class MintSettings(CashuSettings):

mint_input_fee_ppk: int = Field(default=0)
mint_disable_melt_on_error: bool = Field(default=False)
mint_quote_signature_required: bool = Field(default=False)


class MintDeprecationFlags(MintSettings):
Expand Down
4 changes: 0 additions & 4 deletions cashu/mint/ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
NotAllowedError,
QuoteInvalidWitnessError,
QuoteNotPaidError,
QuoteRequiresPubkeyError,
TransactionError,
)
from ..core.helpers import sum_proofs
Expand Down Expand Up @@ -425,9 +424,6 @@ async def mint_quote(self, quote_request: PostMintQuoteRequest) -> MintQuote:
if balance + quote_request.amount > settings.mint_max_balance:
raise NotAllowedError("Mint has reached maximum balance.")

if settings.mint_quote_signature_required and not quote_request.pubkey:
raise QuoteRequiresPubkeyError()

logger.trace(f"requesting invoice for {unit.str(quote_request.amount)}")
invoice_response: InvoiceResponse = await self.backends[method][
unit
Expand Down

0 comments on commit b43c01a

Please sign in to comment.