Refactor mining pool stats fetch to a class
This commit is contained in:
parent
c91428dd5f
commit
ac13098824
6 changed files with 100 additions and 88 deletions
|
@ -105,7 +105,7 @@ void setup()
|
|||
|
||||
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED))
|
||||
{
|
||||
setupMiningPoolStatsFetchTask();
|
||||
MiningPoolStatsFetch::getInstance().setup();
|
||||
}
|
||||
|
||||
ButtonHandler::setup();
|
||||
|
@ -374,7 +374,7 @@ void setupPreferences()
|
|||
if (preferences.getBool("miningPoolStats", DEFAULT_MINING_POOL_STATS_ENABLED))
|
||||
{
|
||||
addScreenMapping(SCREEN_MINING_POOL_STATS_HASHRATE, "Mining Pool Hashrate");
|
||||
if (getMiningPool()->supportsDailyEarnings()) {
|
||||
if (MiningPoolStatsFetch::getInstance().getPool()->supportsDailyEarnings()) {
|
||||
addScreenMapping(SCREEN_MINING_POOL_STATS_EARNINGS, "Mining Pool Earnings");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue