mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-06 10:58:30 +02:00
...
This commit is contained in:
parent
d89d80c245
commit
16b6ae461a
@ -32,7 +32,7 @@ async def lnurl_response(username: str, domain: str, request: Request):
|
||||
callback=request.url_for("lnaddress.lnurl_callback", address_id=address.id),
|
||||
min_sendable=1000,
|
||||
max_sendable=1000000000,
|
||||
metadata=await address.lnurlpay_metadata(),
|
||||
metadata=await address.lnurlpay_metadata(domain=domain),
|
||||
)
|
||||
print("RESP", resp.dict())
|
||||
return resp.dict()
|
||||
|
@ -51,10 +51,9 @@ class Addresses(BaseModel):
|
||||
paid: bool
|
||||
time: int
|
||||
|
||||
async def lnurlpay_metadata(self) -> LnurlPayMetadata:
|
||||
domain = await get_domain(self.domain)
|
||||
text = f"Payment to {self.username}@{domain.domain}"
|
||||
identifier = f"{self.username}@{domain.domain}"
|
||||
async def lnurlpay_metadata(self, domain) -> LnurlPayMetadata:
|
||||
text = f"Payment to {self.username}@{domain}"
|
||||
identifier = f"{self.username}@{domain}"
|
||||
metadata = [["text/plain", text], ["text/identifier", identifier]]
|
||||
|
||||
return LnurlPayMetadata(json.dumps(metadata))
|
||||
|
Loading…
x
Reference in New Issue
Block a user