Update crud.py (#9)

The short url is available for each lnurlw, and with six digits probably far from "safe". I propose to revert to the previous 22 digits.
This commit is contained in:
Leonhard Weese 2024-02-03 04:16:44 +08:00 committed by GitHub
commit 41971f1e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ from .models import CreateWithdrawData, HashCheck, WithdrawLink
async def create_withdraw_link(
data: CreateWithdrawData, wallet_id: str
) -> WithdrawLink:
link_id = urlsafe_short_hash()[:6]
link_id = urlsafe_short_hash()[:22]
available_links = ",".join([str(i) for i in range(data.uses)])
await db.execute(
"""