Switch own data source domain, fix small block notification bug

This commit is contained in:
Djuri Baars 2024-05-13 11:59:02 +02:00
parent 9cdbcc6046
commit ef7d629e8c
2 changed files with 5 additions and 1 deletions

View File

@ -160,6 +160,10 @@ void onWebsocketBlockMessage(esp_websocket_event_data_t *event_data)
{ {
JsonObject block = doc["block"]; JsonObject block = doc["block"];
if (block["height"].as<uint>() == currentBlockHeight) {
return;
}
currentBlockHeight = block["height"].as<uint>(); currentBlockHeight = block["height"].as<uint>();
// Serial.printf("New block found: %d\r\n", block["height"].as<uint>()); // Serial.printf("New block found: %d\r\n", block["height"].as<uint>());

View File

@ -1,6 +1,6 @@
#include "price_notify.hpp" #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 *wsServerPrice = "wss://ws.coincap.io/prices?assets=bitcoin";
// const char* coinCapWsCert = R"(-----BEGIN CERTIFICATE----- // const char* coinCapWsCert = R"(-----BEGIN CERTIFICATE-----