From 0ca391ebe2e7e5cc7a7f20fd64f83cb65b2cbdc8 Mon Sep 17 00:00:00 2001 From: wood Date: Mon, 7 Jul 2025 01:26:24 +0800 Subject: [PATCH] update swqos --- src/swqos/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/swqos/mod.rs b/src/swqos/mod.rs index f486ff7..79d5dbe 100755 --- a/src/swqos/mod.rs +++ b/src/swqos/mod.rs @@ -78,6 +78,7 @@ pub struct SwqosConfig { impl SwqosConfig { pub fn new(endpoint: Option, auth_token: Option, swqos_type: SwqosType, region: SwqosRegion) -> Self { + let auth_token = auth_token.unwrap_or_else(|| "".to_string()); let endpoint = endpoint.unwrap_or_else(|| match swqos_type { SwqosType::Jito => SWQOS_ENDPOINTS_JITO[region as usize].to_string(), SwqosType::NextBlock => SWQOS_ENDPOINTS_NEXTBLOCK[region as usize].to_string(), @@ -86,8 +87,6 @@ impl SwqosConfig { SwqosType::Rpc => "".to_string(), }); - let auth_token = auth_token.unwrap(); - Self { endpoint, auth_token, swqos_type } } } \ No newline at end of file