adjust coingecko option

This commit is contained in:
aglkm
2024-06-01 17:38:13 +03:00
parent 99fdb00f18
commit 8f5d015f6a
4 changed files with 30 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ use crate::Kernel;
// Static explorer config structure
lazy_static! {
static ref CONFIG: ExplorerConfig = {
pub static ref CONFIG: ExplorerConfig = {
let mut cfg = ExplorerConfig::new();
let settings = Config::builder().add_source(config::File::with_name("Explorer"))
.build().unwrap();
@@ -94,9 +94,6 @@ pub async fn get_status(dashboard: Arc<Mutex<Dashboard>>) -> Result<(), anyhow::
data.proto_ver = resp["result"]["Ok"]["protocol_version"].to_string();
}
// Also set cg_api value
data.cg_api = CONFIG.coingecko_api.clone();
Ok(())
}