make format

This commit is contained in:
callebtc
2022-10-15 00:59:21 +02:00
parent 7fb2c81ede
commit 6f913e3cc9
7 changed files with 16 additions and 21 deletions

View File

@@ -5,7 +5,6 @@ from typing import Dict, List
from cashu.core.secp import PrivateKey, PublicKey
from cashu.core.settings import MAX_ORDER
# entropy = bytes([random.getrandbits(8) for i in range(16)])
# mnemonic = bip39.mnemonic_from_bytes(entropy)
# seed = bip39.mnemonic_to_seed(mnemonic)

View File

@@ -6,14 +6,14 @@ from loguru import logger
from starlette.middleware import Middleware
from starlette.middleware.base import BaseHTTPMiddleware
# from starlette_context import context
# from starlette_context.middleware import RawContextMiddleware
from cashu.core.settings import DEBUG, VERSION
from .router import router
from .startup import start_mint_init
# from starlette_context import context
# from starlette_context.middleware import RawContextMiddleware
# class CustomHeaderMiddleware(BaseHTTPMiddleware):
# """

View File

@@ -7,8 +7,6 @@ from typing import Dict, List, Set
from loguru import logger
# from starlette_context import context
import cashu.core.b_dhke as b_dhke
import cashu.core.bolt11 as bolt11
import cashu.core.legacy as legacy
@@ -28,6 +26,8 @@ from cashu.core.settings import LIGHTNING, MAX_ORDER, VERSION
from cashu.core.split import amount_split
from cashu.mint.crud import LedgerCrud
# from starlette_context import context
class Ledger:
def __init__(

View File

@@ -16,7 +16,6 @@ from cashu.core.base import (
SplitRequest,
)
from cashu.core.errors import CashuError
from cashu.mint.startup import ledger
router: APIRouter = APIRouter()

View File

@@ -5,15 +5,12 @@ import asyncio
from loguru import logger
from cashu.core.migrations import migrate_databases
from cashu.core.settings import CASHU_DIR, LIGHTNING
from cashu.mint import migrations
from cashu.mint.ledger import Ledger
from cashu.core.settings import MINT_PRIVATE_KEY
from cashu.core.db import Database
from cashu.core.migrations import migrate_databases
from cashu.core.settings import CASHU_DIR, LIGHTNING, MINT_PRIVATE_KEY
from cashu.lightning.lnbits import LNbitsWallet
from cashu.mint import migrations
from cashu.mint.ledger import Ledger
ledger = Ledger(
db=Database("mint", "data/mint"),

View File

@@ -10,14 +10,14 @@ from cashu.core.migrations import migrate_databases
SERVER_ENDPOINT = "http://localhost:3338"
from cashu.mint import migrations
from cashu.mint.ledger import Ledger
from cashu.core.settings import MINT_PRIVATE_KEY, MAX_ORDER
from cashu.core.db import Database
from cashu.lightning.lnbits import LNbitsWallet
import os
from cashu.core.db import Database
from cashu.core.settings import MAX_ORDER, MINT_PRIVATE_KEY
from cashu.lightning.lnbits import LNbitsWallet
from cashu.mint import migrations
from cashu.mint.ledger import Ledger
async def assert_err(f, msg):
"""Compute f() and expect an error message 'msg'."""

View File

@@ -7,11 +7,11 @@ import pytest_asyncio
from cashu.core.base import Proof
from cashu.core.helpers import async_unwrap, sum_proofs
from cashu.core.migrations import migrate_databases
from cashu.core.settings import MAX_ORDER
from cashu.wallet import migrations
from cashu.wallet.wallet import Wallet
from cashu.wallet.wallet import Wallet as Wallet1
from cashu.wallet.wallet import Wallet as Wallet2
from cashu.core.settings import MAX_ORDER
SERVER_ENDPOINT = "http://localhost:3338"