Merge pull request #382 from arcbtc/FastAPI

restored create invoice api endpoint
This commit is contained in:
Arc 2021-11-03 11:49:53 +00:00 committed by GitHub
commit d53a680c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -50,8 +50,6 @@ async def create_invoice(
webhook: Optional[str] = None,
conn: Optional[Connection] = None,
) -> Tuple[str, str]:
if memo == None:
memo = "LN payment"
invoice_memo = None if description_hash else memo
ok, checking_id, payment_request, error_message = await WALLET.create_invoice(

View File

@ -82,6 +82,7 @@ async def api_lnurl_callback(request: Request, link_id):
return LnurlErrorResponse(
reason=f"Got a comment with {len(comment)} characters, but can only accept {link.comment_chars}"
).dict()
payment_hash, payment_request = await create_invoice(
wallet_id=link.wallet,
amount=int(amount_received / 1000),