Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async def remove_unique_withdraw_link(link: WithdrawLink, unique_hash: str) -> N

async def increment_withdraw_link(link: WithdrawLink) -> None:
link.used = link.used + 1
link.open_time = int(datetime.now().timestamp()) + link.wait_time
link.open_time = int(datetime.now().timestamp())
await update_withdraw_link(link)


Expand Down
4 changes: 2 additions & 2 deletions views_lnurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ async def api_lnurl_callback(

now = int(datetime.now().timestamp())

if now < link.open_time:
if now < link.open_time + link.wait_time:
return LnurlErrorResponse(
reason=f"wait link open_time {link.open_time - now} seconds."
reason=f"Wait {link.open_time + link.wait_time - now} seconds."
)

if not id_unique_hash and link.is_unique:
Expand Down