wos debugging

lnurl debug

text identifier

text

try1

try2

debugging

more debug

...

....

hard code indentifier

.

more hard code

.

trying

revert

remove identifier

adding identifier...again

.

stupid

return text instead of json

htmlresponse

on more spin

.

added tag

revert to JSON return

.

ditch lnurl lib

.

..

..

clean prints
This commit is contained in:
benarc
2021-12-01 21:55:04 +00:00
parent f7eba156e7
commit 69a4583203
4 changed files with 25 additions and 18 deletions
+5 -4
View File
@@ -3,7 +3,7 @@ from typing import Optional
from fastapi.params import Query
from lnurl.types import LnurlPayMetadata
from pydantic.main import BaseModel # type: ignore
from pydantic.main import BaseModel
class CreateDomain(BaseModel):
@@ -49,8 +49,9 @@ class Addresses(BaseModel):
paid: bool
time: int
async def lnurlpay_metadata(self) -> LnurlPayMetadata:
async def lnurlpay_metadata(self, domain) -> LnurlPayMetadata:
text = f"Payment to {self.username}"
metadata = [["text/plain", text]]
identifier = f"{self.username}@{domain}"
metadata = [["text/plain", text], ["text/identifier", identifier]]
return LnurlPayMetadata(json.dumps(metadata))