parent
5706928063
commit
31264e1fe4
1 changed files with 4 additions and 4 deletions
|
|
@ -56,13 +56,13 @@ class PayLink(BaseModel):
|
|||
return cls(**data)
|
||||
|
||||
def lnurl(self, req: Request) -> str:
|
||||
url = req.url_for("lnurlp.api_lnurl_response", link_id=self.id)
|
||||
url = str(req.url_for("lnurlp.api_lnurl_response", link_id=self.id))
|
||||
# Check if url is .onion and change to http
|
||||
if urlparse(url).netloc.endswith(".onion"):
|
||||
# change url string scheme to http
|
||||
url = url.replace("https://", "http://")
|
||||
|
||||
return lnurl_encode(str(url))
|
||||
return lnurl_encode(url)
|
||||
|
||||
def success_action(self, payment_hash: str) -> Optional[Dict]:
|
||||
if self.success_url:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue