mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 10:34:20 +01:00
26 lines
669 B
Python
26 lines
669 B
Python
import asyncio
|
|
from loguru import logger
|
|
|
|
from cashu.core.settings import CASHU_DIR
|
|
|
|
from cashu.lightning import WALLET
|
|
from cashu.mint.migrations import m001_initial
|
|
|
|
from . import ledger
|
|
|
|
|
|
async def load_ledger():
|
|
await asyncio.wait([m001_initial(ledger.db)])
|
|
await ledger.load_used_proofs()
|
|
|
|
error_message, balance = await WALLET.status()
|
|
if error_message:
|
|
logger.warning(
|
|
f"The backend for {WALLET.__class__.__name__} isn't working properly: '{error_message}'",
|
|
RuntimeWarning,
|
|
)
|
|
|
|
logger.info(f"Lightning balance: {balance} sat")
|
|
logger.info(f"Data dir: {CASHU_DIR}")
|
|
logger.info("Mint started.")
|