upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/tollgate_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/tollgate_main.c')
-rw-r--r--main/tollgate_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index d4dcf0d..3f83923 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -20,6 +20,7 @@
20#include "nucula_wallet.h" 20#include "nucula_wallet.h"
21#include "wifistr.h" 21#include "wifistr.h"
22#include "tollgate_client.h" 22#include "tollgate_client.h"
23#include "lightning_payout.h"
23 24
24#define MAX_STA_RETRY 5 25#define MAX_STA_RETRY 5
25static const char *TAG = "tollgate_main"; 26static const char *TAG = "tollgate_main";
@@ -89,6 +90,8 @@ static void ip_event_handler(void *arg, esp_event_base_t event_base,
89 const tollgate_config_t *cfg = tollgate_config_get(); 90 const tollgate_config_t *cfg = tollgate_config_get();
90 nucula_wallet_init(cfg->mint_url); 91 nucula_wallet_init(cfg->mint_url);
91 92
93 lightning_payout_init(&cfg->payout);
94
92 char gw_ip_str[16]; 95 char gw_ip_str[16];
93 snprintf(gw_ip_str, sizeof(gw_ip_str), IPSTR, IP2STR(&event->ip_info.gw)); 96 snprintf(gw_ip_str, sizeof(gw_ip_str), IPSTR, IP2STR(&event->ip_info.gw));
94 tollgate_client_on_sta_connected(gw_ip_str); 97 tollgate_client_on_sta_connected(gw_ip_str);
@@ -282,5 +285,6 @@ void app_main(void)
282 vTaskDelay(pdMS_TO_TICKS(1000)); 285 vTaskDelay(pdMS_TO_TICKS(1000));
283 session_tick(); 286 session_tick();
284 tollgate_client_tick(); 287 tollgate_client_tick();
288 lightning_payout_tick();
285 } 289 }
286} 290}