Refactor BlockNotify to a class, use websocketsClient

This commit is contained in:
Djuri 2025-01-06 00:43:31 +01:00
parent ebbec75e6b
commit e330984ba2
Signed by: djuri
GPG key ID: 61B9B2DDE5AA3AC1
9 changed files with 239 additions and 257 deletions

View file

@ -265,7 +265,7 @@ void setupPreferences()
EPDManager::getInstance().setForegroundColor(preferences.getUInt("fgColor", DEFAULT_FG_COLOR));
EPDManager::getInstance().setBackgroundColor(preferences.getUInt("bgColor", DEFAULT_BG_COLOR));
setBlockHeight(preferences.getUInt("blockHeight", INITIAL_BLOCK_HEIGHT));
BlockNotify::getInstance().setBlockHeight(preferences.getUInt("blockHeight", INITIAL_BLOCK_HEIGHT));
setPrice(preferences.getUInt("lastPrice", INITIAL_LAST_PRICE), CURRENCY_USD);
if (!preferences.isKey("enableDebugLog")) {
@ -373,7 +373,7 @@ void setupWebsocketClients(void *pvParameters)
}
else if (dataSource == THIRD_PARTY_SOURCE)
{
setupBlockNotify();
BlockNotify::getInstance().setup();
setupPriceNotify();
}