bug: round hashrate data in MinerData, and remove some unused imports.

This commit is contained in:
UpstreamData
2023-10-10 13:59:28 -06:00
parent ad374fe2fb
commit 850c266555
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ import json
import logging import logging
import re import re
import warnings import warnings
from typing import Tuple, Union from typing import Union
from pyasic.errors import APIError, APIWarning from pyasic.errors import APIError, APIWarning

View File

@@ -241,7 +241,7 @@ class MinerData:
if item.hashrate is not None: if item.hashrate is not None:
hr_data.append(item.hashrate) hr_data.append(item.hashrate)
if len(hr_data) > 0: if len(hr_data) > 0:
return sum(hr_data) return round(sum(hr_data), 2)
return self._hashrate return self._hashrate
@hashrate.setter @hashrate.setter