Skip to content

Commit

Permalink
fix: bad import
Browse files Browse the repository at this point in the history
  • Loading branch information
motorina0 committed Oct 31, 2024
1 parent 2bb6377 commit fd4f1e6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from loguru import logger

from .crud import db
from .nostr_client import all_routers, nostr_client
from .router import all_routers, nostr_client
from .tasks import check_relays, init_relays, subscribe_events
from .views import nostrclient_generic_router
from .views_api import nostrclient_api_router
Expand Down
5 changes: 0 additions & 5 deletions nostr_client.py

This file was deleted.

7 changes: 6 additions & 1 deletion router.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
from lnbits.helpers import urlsafe_short_hash
from loguru import logger

from . import nostr_client
from .nostr.client.client import NostrClient

# from . import nostr_client
from .nostr.message_pool import EndOfStoredEventsMessage, EventMessage, NoticeMessage

nostr_client: NostrClient = NostrClient()
all_routers: list["NostrRouter"] = []


class NostrRouter:
received_subscription_events: dict[str, List[EventMessage]]
Expand Down
3 changes: 1 addition & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

from loguru import logger

from . import nostr_client
from .crud import get_relays
from .nostr.message_pool import EndOfStoredEventsMessage, EventMessage, NoticeMessage
from .router import NostrRouter
from .router import NostrRouter, nostr_client


async def init_relays():
Expand Down
3 changes: 1 addition & 2 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
from .helpers import normalize_public_key
from .models import Config, Relay, RelayStatus, TestMessage, TestMessageResponse
from .nostr.key import EncryptedDirectMessage, PrivateKey
from .nostr_client import all_routers, nostr_client
from .router import NostrRouter
from .router import NostrRouter, all_routers, nostr_client

nostrclient_api_router = APIRouter()

Expand Down

0 comments on commit fd4f1e6

Please sign in to comment.