diff --git a/src/lib/block_notify.cpp b/src/lib/block_notify.cpp index cc927bc..c2fb092 100644 --- a/src/lib/block_notify.cpp +++ b/src/lib/block_notify.cpp @@ -160,6 +160,10 @@ void onWebsocketBlockMessage(esp_websocket_event_data_t *event_data) { JsonObject block = doc["block"]; + if (block["height"].as() == currentBlockHeight) { + return; + } + currentBlockHeight = block["height"].as(); // Serial.printf("New block found: %d\r\n", block["height"].as()); diff --git a/src/lib/price_notify.cpp b/src/lib/price_notify.cpp index bcd091a..0a07f39 100644 --- a/src/lib/price_notify.cpp +++ b/src/lib/price_notify.cpp @@ -1,6 +1,6 @@ #include "price_notify.hpp" -const char *wsOwnServerPrice = "wss://ws.btclock.store/ws?assets=bitcoin"; +const char *wsOwnServerPrice = "wss://ws.btclock.dev/ws?assets=bitcoin"; const char *wsServerPrice = "wss://ws.coincap.io/prices?assets=bitcoin"; // const char* coinCapWsCert = R"(-----BEGIN CERTIFICATE-----