Skip to content

Commit ef442a7

Browse files
committed
fix: invalidate SIGN_KEY on reset wifi
1 parent 2f96ed8 commit ef442a7

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/buttons.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ async fn submit_reset_wifi(
330330
.nvs
331331
.invalidate_key(esp_hal_wifimanager::WIFI_NVS_KEY)
332332
.await;
333+
_ = state.nvs.invalidate_key(b"SIGN_KEY").await;
333334

334335
{
335336
let mut state = state.state.lock().await;

src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ async fn main(spawner: Spawner) {
119119
let mut sign_key = [0; 4];
120120
if nvs.get_key(b"SIGN_KEY", &mut sign_key).await.is_ok() {
121121
unsafe { crate::state::SIGN_KEY = u32::from_be_bytes(sign_key) >> 1 };
122-
} else {
123122
}
124123

125124
spawner.must_spawn(lcd::lcd_task(

0 commit comments

Comments
 (0)