Skip to content

Commit

Permalink
fix: url_for str() (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
dni authored Sep 29, 2023
1 parent d413732 commit bc2e8e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lnurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def lnurl_response(req: Request, item_id: int) -> dict:

resp = LnurlPayResponse(
callback=ClearnetUrl(
req.url_for("offlineshop.lnurl_callback", item_id=item.id), scheme="https"
str(req.url_for("offlineshop.lnurl_callback", item_id=item.id))
),
minSendable=MilliSatoshi(price_msat),
maxSendable=MilliSatoshi(price_msat),
Expand Down
6 changes: 3 additions & 3 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ def from_row(cls, row: Row) -> "Item":
return cls(**data)

def lnurl(self, req: Request) -> str:
return lnurl_encode(req.url_for("offlineshop.lnurl_response", item_id=self.id))
return lnurl_encode(str(req.url_for("offlineshop.lnurl_response", item_id=self.id)))

def values(self, req: Request):
values = self.dict()
values["lnurl"] = lnurl_encode(
req.url_for("offlineshop.lnurl_response", item_id=self.id)
str(req.url_for("offlineshop.lnurl_response", item_id=self.id))
)
return values

Expand All @@ -129,7 +129,7 @@ def success_action(

return UrlAction(
url=ClearnetUrl(
req.url_for("offlineshop.confirmation_code", p=payment_hash),
str(req.url_for("offlineshop.confirmation_code", p=payment_hash)),
scheme="https",
),
description=Max144Str(
Expand Down

0 comments on commit bc2e8e1

Please sign in to comment.