diff --git a/lnbits/extensions/gerty/helpers.py b/lnbits/extensions/gerty/helpers.py index 5897423e..8c2cc9ea 100644 --- a/lnbits/extensions/gerty/helpers.py +++ b/lnbits/extensions/gerty/helpers.py @@ -390,9 +390,7 @@ async def api_get_mining_stat(stat_slug: str, gerty): r = await get_mempool_info("hashrate_1m", gerty) data = r stat["current"] = data["currentDifficulty"] - stat["previous"] = data["difficulty"][len(data["difficulty"]) - 2][ - "difficulty" - ] + stat["previous"] = data["difficulty"][len(data["difficulty"]) - 2]["difficulty"] return stat @@ -946,5 +944,3 @@ async def get_mempool_stat(stat_slug: str, gerty): ) ) return text - - diff --git a/lnbits/extensions/gerty/views.py b/lnbits/extensions/gerty/views.py index 238e3721..33e95d3e 100644 --- a/lnbits/extensions/gerty/views.py +++ b/lnbits/extensions/gerty/views.py @@ -1,6 +1,6 @@ from http import HTTPStatus -from fastapi import Request, Depends +from fastapi import Depends, Request from fastapi.templating import Jinja2Templates from starlette.exceptions import HTTPException from starlette.responses import HTMLResponse diff --git a/lnbits/extensions/gerty/views_api.py b/lnbits/extensions/gerty/views_api.py index 81c84c1d..62e92b75 100644 --- a/lnbits/extensions/gerty/views_api.py +++ b/lnbits/extensions/gerty/views_api.py @@ -1,7 +1,7 @@ import json from http import HTTPStatus -from fastapi import Query, Depends +from fastapi import Depends, Query from loguru import logger from starlette.exceptions import HTTPException @@ -17,7 +17,6 @@ from .crud import ( get_mempool_info, update_gerty, ) - from .helpers import * from .models import Gerty