diff --git a/lnurl.py b/lnurl.py index 4b39374..6ebea46 100644 --- a/lnurl.py +++ b/lnurl.py @@ -195,7 +195,7 @@ async def lnurlp_response(req: Request, hit_id: str): return {"status": "ERROR", "reason": "Card is disabled."} payResponse = { "tag": "payRequest", - "callback": req.url_for("boltcards.lnurlp_callback", hit_id=hit_id), + "callback": str(req.url_for("boltcards.lnurlp_callback", hit_id=hit_id)), "metadata": LnurlPayMetadata(json.dumps([["text/plain", "Refund"]])), "minSendable": 1 * 1000, "maxSendable": card.tx_limit * 1000, diff --git a/models.py b/models.py index 5ea4be1..bd044ac 100644 --- a/models.py +++ b/models.py @@ -34,7 +34,7 @@ class Card(BaseModel): return cls(**dict(row)) def lnurl(self, req: Request) -> Lnurl: - url = req.url_for("boltcard.lnurl_response", device_id=self.id, _external=True) + url = str(req.url_for("boltcard.lnurl_response", device_id=self.id, _external=True)) return lnurl_encode(url) async def lnurlpay_metadata(self) -> LnurlPayMetadata: