fix: import after core refactoring

This commit is contained in:
Vlad Stan 2023-09-13 09:55:40 +03:00
parent 926f940b46
commit d26ff891ce

View file

@ -4,8 +4,7 @@ from typing import List, Optional, Tuple
from loguru import logger from loguru import logger
from lnbits.bolt11 import decode from lnbits.bolt11 import decode
from lnbits.core import create_invoice, get_wallet from lnbits.core.services import websocketUpdater, create_invoice, get_wallet
from lnbits.core.services import websocketUpdater
from . import nostr_client from . import nostr_client
from .crud import ( from .crud import (
@ -291,7 +290,7 @@ async def process_nostr_message(msg: str):
return return
except Exception as ex: except Exception as ex:
logger.warning(ex) logger.debug(ex)
async def create_or_update_order_from_dm( async def create_or_update_order_from_dm(
@ -368,6 +367,7 @@ async def extract_customer_order_from_dm(
return order return order
async def get_last_event_date_for_merchant(id) -> int: async def get_last_event_date_for_merchant(id) -> int:
last_order_time = await get_last_order_time(id) last_order_time = await get_last_order_time(id)
last_dm_time = await get_last_direct_messages_created_at(id) last_dm_time = await get_last_direct_messages_created_at(id)
@ -375,6 +375,7 @@ async def get_last_event_date_for_merchant(id) -> int:
last_product_update = await get_last_product_update_time(id) last_product_update = await get_last_product_update_time(id)
return max(last_order_time, last_dm_time, last_stall_update, last_product_update) return max(last_order_time, last_dm_time, last_stall_update, last_product_update)
async def _handle_nip04_message(merchant_public_key: str, event: NostrEvent): async def _handle_nip04_message(merchant_public_key: str, event: NostrEvent):
merchant = await get_merchant_by_pubkey(merchant_public_key) merchant = await get_merchant_by_pubkey(merchant_public_key)
assert merchant, f"Merchant not found for public key '{merchant_public_key}'" assert merchant, f"Merchant not found for public key '{merchant_public_key}'"