make format

This commit is contained in:
callebtc 2022-10-21 15:31:24 +02:00 committed by dni ⚡
parent 4af106cce6
commit 59ffe8b979
5 changed files with 40 additions and 50 deletions

View File

@ -34,7 +34,7 @@ def cashu_renderer():
return template_renderer(["lnbits/extensions/cashu/templates"]) return template_renderer(["lnbits/extensions/cashu/templates"])
from .tasks import wait_for_paid_invoices, startup_cashu_mint from .tasks import startup_cashu_mint, wait_for_paid_invoices
from .views import * # noqa from .views import * # noqa
from .views_api import * # noqa from .views_api import * # noqa

View File

@ -2,21 +2,19 @@ import os
import random import random
import time import time
from binascii import hexlify, unhexlify from binascii import hexlify, unhexlify
from typing import List, Optional, Union, Any from typing import Any, List, Optional, Union
from cashu.core.base import MintKeyset
from embit import bip32, bip39, ec, script from embit import bip32, bip39, ec, script
from embit.networks import NETWORKS from embit.networks import NETWORKS
from loguru import logger from loguru import logger
from lnbits.db import Connection, Database
from lnbits.helpers import urlsafe_short_hash from lnbits.helpers import urlsafe_short_hash
from . import db from . import db
from .models import Cashu, Pegs, Promises, Proof from .models import Cashu, Pegs, Promises, Proof
from cashu.core.base import MintKeyset
from lnbits.db import Database, Connection
async def create_cashu( async def create_cashu(
cashu_id: str, keyset_id: str, wallet_id: str, data: Cashu cashu_id: str, keyset_id: str, wallet_id: str, data: Cashu

View File

@ -1,14 +1,14 @@
import asyncio import asyncio
import json import json
from cashu.core.migrations import migrate_databases
from cashu.mint import migrations
from lnbits.core.models import Payment from lnbits.core.models import Payment
from lnbits.tasks import register_invoice_listener from lnbits.tasks import register_invoice_listener
from .crud import get_cashu
from cashu.mint import migrations
from cashu.core.migrations import migrate_databases
from . import db, ledger from . import db, ledger
from .crud import get_cashu
async def startup_cashu_mint(): async def startup_cashu_mint():

View File

@ -7,7 +7,9 @@
</p> </p>
<small <small
>Created by >Created by
<a href="https://github.com/arcbtc" target="_blank">arcbtc</a>, <a href="https://github.com/motorina0" target="_blank">vlad</a>, <a href="https://github.com/calle" target="_blank">calle</a>.</small <a href="https://github.com/arcbtc" target="_blank">arcbtc</a>,
<a href="https://github.com/motorina0" target="_blank">vlad</a>,
<a href="https://github.com/calle" target="_blank">calle</a>.</small
> >
</q-card-section> </q-card-section>
</q-card> </q-card>

View File

@ -1,61 +1,51 @@
import json import json
from http import HTTPStatus
from typing import Union
import math import math
from http import HTTPStatus
from typing import Dict, List, Union from typing import Dict, List, Union
import httpx import httpx
from fastapi import Query
from fastapi.params import Depends
from lnurl import decode as decode_lnurl
from loguru import logger
from secp256k1 import PublicKey
from starlette.exceptions import HTTPException
from lnbits import bolt11
from lnbits.core.crud import get_user
from lnbits.core.services import (
check_transaction_status,
create_invoice,
fee_reserve,
pay_invoice,
)
from lnbits.core.views.api import api_payment
from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key
from lnbits.wallets.base import PaymentStatus
from lnbits.helpers import urlsafe_short_hash
from lnbits.core.crud import check_internal
# --------- extension imports
from . import cashu_ext
from .crud import (
create_cashu,
delete_cashu,
get_cashu,
get_cashus,
)
from .models import Cashu
from . import ledger
# -------- cashu imports # -------- cashu imports
from cashu.core.base import ( from cashu.core.base import (
Proof,
BlindedSignature, BlindedSignature,
CheckFeesRequest, CheckFeesRequest,
CheckFeesResponse, CheckFeesResponse,
CheckRequest, CheckRequest,
GetMeltResponse, GetMeltResponse,
GetMintResponse, GetMintResponse,
Invoice,
MeltRequest, MeltRequest,
MintRequest, MintRequest,
PostSplitResponse, PostSplitResponse,
Proof,
SplitRequest, SplitRequest,
Invoice,
) )
from fastapi import Query
from fastapi.params import Depends
from lnurl import decode as decode_lnurl
from loguru import logger
from secp256k1 import PublicKey
from starlette.exceptions import HTTPException
from lnbits import bolt11
from lnbits.core.crud import check_internal, get_user
from lnbits.core.services import (
check_transaction_status,
create_invoice,
fee_reserve,
pay_invoice,
)
from lnbits.core.views.api import api_payment
from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key
from lnbits.helpers import urlsafe_short_hash
from lnbits.wallets.base import PaymentStatus
from . import cashu_ext, ledger
from .crud import create_cashu, delete_cashu, get_cashu, get_cashus
from .models import Cashu
# --------- extension imports
LIGHTNING = False LIGHTNING = False