fix for latest fastapi

This commit is contained in:
dni ⚡ 2023-06-20 11:18:03 +02:00
commit a2f03437eb
No known key found for this signature in database
GPG key ID: 886317704CC4E618
2 changed files with 4 additions and 3 deletions

View file

@ -59,14 +59,14 @@ class WithdrawLink(BaseModel):
"withdraw.api_lnurl_response", unique_hash=self.unique_hash
)
return lnurl_encode(url)
return lnurl_encode(str(url))
def lnurl_response(self, req: Request) -> LnurlWithdrawResponse:
url = req.url_for(
name="withdraw.api_lnurl_callback", unique_hash=self.unique_hash
)
return LnurlWithdrawResponse(
callback=ClearnetUrl(url, scheme="https"),
callback=ClearnetUrl(str(url), scheme="https"),
k1=self.k1,
minWithdrawable=MilliSatoshi(self.min_withdrawable * 1000),
maxWithdrawable=MilliSatoshi(self.max_withdrawable * 1000),