chore: clean-up rebase left overs

This commit is contained in:
Vlad Stan
2022-08-03 13:54:34 +03:00
parent 828e4a78d1
commit 6c332ce0c5
3 changed files with 2 additions and 35 deletions

View File

@ -4,8 +4,8 @@ from typing import List, Optional
from lnbits.helpers import urlsafe_short_hash
from . import db
from .helpers import derive_address, parse_key
from .models import Address, Config, Mempool, WalletAccount
from .helpers import derive_address
from .models import Address, Config, WalletAccount
##########################WALLETS####################

View File

@ -27,16 +27,6 @@ class WalletAccount(BaseModel):
return cls(**dict(row))
### TODO: fix statspay dependcy and remove
class Mempool(BaseModel):
user: str
endpoint: str
@classmethod
def from_row(cls, row: Row) -> "Mempool":
return cls(**dict(row))
class Address(BaseModel):
id: str
address: str

View File

@ -17,19 +17,16 @@ from lnbits.extensions.watchonly import watchonly_ext
from .crud import (
create_config,
create_fresh_addresses,
create_mempool,
create_watch_wallet,
delete_addresses_for_wallet,
delete_watch_wallet,
get_addresses,
get_config,
get_fresh_address,
get_mempool,
get_watch_wallet,
get_watch_wallets,
update_address,
update_config,
update_mempool,
update_watch_wallet,
)
from .helpers import parse_key
@ -372,23 +369,3 @@ async def api_get_config(w: WalletTypeInfo = Depends(get_key_type)):
if not config:
config = await create_config(user=w.wallet.user)
return config.dict()
#############################MEMPOOL##########################
### TODO: fix statspay dependcy and remove
@watchonly_ext.put("/api/v1/mempool")
async def api_update_mempool(
endpoint: str = Query(...), w: WalletTypeInfo = Depends(require_admin_key)
):
mempool = await update_mempool(**{"endpoint": endpoint}, user=w.wallet.user)
return mempool.dict()
### TODO: fix statspay dependcy and remove
@watchonly_ext.get("/api/v1/mempool")
async def api_get_mempool(w: WalletTypeInfo = Depends(require_admin_key)):
mempool = await get_mempool(w.wallet.user)
if not mempool:
mempool = await create_mempool(user=w.wallet.user)
return mempool.dict()