Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to lnbits 1.0.0 #19

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,3 @@

- Gambling in a qrcode
- Pay sats with x chance of winning x

## Coinflips

- Create coinflips, x users pay to join and winner takes all (minus registration fee)

Gambling is dangerous, gamble responsibly.
https://www.gambleaware.org
21 changes: 0 additions & 21 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import asyncio

from fastapi import APIRouter
from lnbits.tasks import create_permanent_unique_task
from loguru import logger

from .crud import db
from .tasks import wait_for_paid_invoices
from .views import satsdice_generic_router
from .views_api import satsdice_api_router
from .views_lnurl import satsdice_lnurl_router
Expand All @@ -22,20 +17,4 @@
}
]

scheduled_tasks: list[asyncio.Task] = []


def satsdice_stop():
for task in scheduled_tasks:
try:
task.cancel()
except Exception as ex:
logger.warning(ex)


def satsdice_start():
task = create_permanent_unique_task("ext_satsdice", wait_for_paid_invoices)
scheduled_tasks.append(task)


__all__ = ["db", "satsdice_ext", "satsdice_static_files"]
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "Sats Dice",
"short_description": "LNURL Satoshi dice",
"tile": "/satsdice/static/image/satsdice.png",
"min_lnbits_version": "0.11.0",
"min_lnbits_version": "1.0.0",
"tags": ["gambling"],
"contributors": [
{
"name": "arcbtc",
Expand Down
Loading