From 7820837d79ebc8e00221b5206bdd8e3ca0ae4c15 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 May 2026 19:58:12 +0530 Subject: Sync display with live TollGate state - Periodic refresh: wallet balance + client count every 5s from main loop - display_notify_payment() API: passes payment amount and time allotment - tollgate_api.c: triggers PAYMENT_RECEIVED state after wallet receive - AP station events update client count in real-time - Config data (price, mint) passed to display during boot phase - Payment screen shows actual sats paid and time purchased - Updated DISPLAY_UI_PLAN.md with state-sync audit and checklist --- main/tollgate_api.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main/tollgate_api.c') diff --git a/main/tollgate_api.c b/main/tollgate_api.c index 650b0f3..7ddfb9e 100644 --- a/main/tollgate_api.c +++ b/main/tollgate_api.c @@ -4,6 +4,7 @@ #include "session.h" #include "firewall.h" #include "nucula_wallet.h" +#include "display.h" #include "esp_log.h" #include "cJSON.h" #include "lwip/sockets.h" @@ -313,6 +314,8 @@ static esp_err_t api_post_payment(httpd_req_t *req) nucula_wallet_receive(body_copy); + display_notify_payment(token->total_amount, allotment); + free(states); free(token); return ESP_OK; -- cgit v1.2.3