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