Skip to content

Commit

Permalink
hotfix: missing url_for string conversions (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dni authored Dec 21, 2023
1 parent 407c515 commit 631624c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lnurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def from_row(cls, row: Row) -> "Card":
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:
Expand Down

0 comments on commit 631624c

Please sign in to comment.