hotfix: missing url_for string conversions (#28)
This commit is contained in:
parent
407c515b11
commit
631624c54f
2 changed files with 2 additions and 2 deletions
2
lnurl.py
2
lnurl.py
|
|
@ -195,7 +195,7 @@ async def lnurlp_response(req: Request, hit_id: str):
|
||||||
return {"status": "ERROR", "reason": "Card is disabled."}
|
return {"status": "ERROR", "reason": "Card is disabled."}
|
||||||
payResponse = {
|
payResponse = {
|
||||||
"tag": "payRequest",
|
"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"]])),
|
"metadata": LnurlPayMetadata(json.dumps([["text/plain", "Refund"]])),
|
||||||
"minSendable": 1 * 1000,
|
"minSendable": 1 * 1000,
|
||||||
"maxSendable": card.tx_limit * 1000,
|
"maxSendable": card.tx_limit * 1000,
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class Card(BaseModel):
|
||||||
return cls(**dict(row))
|
return cls(**dict(row))
|
||||||
|
|
||||||
def lnurl(self, req: Request) -> Lnurl:
|
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)
|
return lnurl_encode(url)
|
||||||
|
|
||||||
async def lnurlpay_metadata(self) -> LnurlPayMetadata:
|
async def lnurlpay_metadata(self) -> LnurlPayMetadata:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue