From 496d8464c79943eac54fe34e4384ddb27c923290 Mon Sep 17 00:00:00 2001 From: aglkm <39521015+aglkm@users.noreply.github.com> Date: Tue, 1 Oct 2024 22:52:47 +0300 Subject: [PATCH] correct chain detection --- src/requests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requests.rs b/src/requests.rs index b26f2d7..552a979 100644 --- a/src/requests.rs +++ b/src/requests.rs @@ -162,7 +162,7 @@ pub async fn get_status(dashboard: Arc>) -> Result<(), anyhow:: data.kernel_mmr_size = resp2["result"]["Ok"]["header"]["kernel_mmr_size"].to_string(); } - data.chain = resp1["result"]["Ok"]["chain"].to_string(); + data.chain = resp1["result"]["Ok"]["chain"].as_str().unwrap().to_string(); data.height = resp1["result"]["Ok"]["tip"]["height"].to_string(); data.sync = resp1["result"]["Ok"]["sync_status"].as_str().unwrap().to_string(); data.node_ver = resp1["result"]["Ok"]["user_agent"].as_str().unwrap().to_string();