formatting

This commit is contained in:
dni ⚡ 2022-12-30 09:47:49 +01:00
parent 8e344ecf4b
commit f3e0bd4907
3 changed files with 3 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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