mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-19 12:01:12 +02:00
@@ -91,7 +91,7 @@ class CreateInvoiceData(BaseModel):
|
|||||||
out: Optional[bool] = True
|
out: Optional[bool] = True
|
||||||
amount: int = Query(None, ge=1)
|
amount: int = Query(None, ge=1)
|
||||||
memo: str = None
|
memo: str = None
|
||||||
unit: Optional[str] = None
|
unit: Optional[str] = 'sat'
|
||||||
description_hash: Optional[str] = None
|
description_hash: Optional[str] = None
|
||||||
lnurl_callback: Optional[str] = None
|
lnurl_callback: Optional[str] = None
|
||||||
lnurl_balance_check: Optional[str] = None
|
lnurl_balance_check: Optional[str] = None
|
||||||
@@ -107,7 +107,7 @@ async def api_payments_create_invoice(data: CreateInvoiceData, wallet: Wallet):
|
|||||||
else:
|
else:
|
||||||
description_hash = b""
|
description_hash = b""
|
||||||
memo = data.memo
|
memo = data.memo
|
||||||
if not data.unit or data.unit == "sat":
|
if data.unit == 'sat':
|
||||||
amount = data.amount
|
amount = data.amount
|
||||||
else:
|
else:
|
||||||
price_in_sats = await fiat_amount_as_satoshis(data.amount, data.unit)
|
price_in_sats = await fiat_amount_as_satoshis(data.amount, data.unit)
|
||||||
|
Reference in New Issue
Block a user