From ef7d629e8cc420bc1f7045168e9140492e491f9e Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Mon, 13 May 2024 11:59:02 +0200 Subject: [PATCH] Switch own data source domain, fix small block notification bug --- src/lib/block_notify.cpp | 4 ++++ src/lib/price_notify.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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-----