Skip to content

Commit

Permalink
cleaning up data-providers config
Browse files Browse the repository at this point in the history
  • Loading branch information
silva-fj committed Sep 11, 2024
1 parent 3564bbb commit 06c870b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tee-worker/litentry/core/data-providers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ pub struct DataProviderConfig {
pub blockchain_info_api_url: String,
pub sendgrid_api_key: String,
pub sendgrid_from_email: String,
pub sendgrid_redirect_url: String,
}

impl DataProviderConfig {
Expand Down Expand Up @@ -273,7 +272,6 @@ impl DataProviderConfig {
blockchain_info_api_url: "https://blockchain.info/".to_string(),
sendgrid_api_key: "".to_string(),
sendgrid_from_email: "".to_string(),
sendgrid_redirect_url: "".to_string(),
};

// we allow to override following config properties for non prod dev
Expand Down Expand Up @@ -425,9 +423,6 @@ impl DataProviderConfig {
if let Ok(v) = env::var("SENDGRID_FROM_EMAIL") {
config.set_sendgrid_from_email(v);
}
if let Ok(v) = env::var("SENDGRID_REDIRECT_URL") {
config.set_sendgrid_redirect_url(v)?;
}

Ok(config)
}
Expand Down Expand Up @@ -655,12 +650,6 @@ impl DataProviderConfig {
debug!("set_sendgrid_from_email: {:?}", v);
self.sendgrid_from_email = v;
}
pub fn set_sendgrid_redirect_url(&mut self, v: String) -> Result<(), Error> {
check_url(&v)?;
debug!("set_sendgrid_redirect_url: {:?}", v);
self.sendgrid_redirect_url = v;
Ok(())
}
}

fn check_url(v: &String) -> Result<(), Error> {
Expand Down

0 comments on commit 06c870b

Please sign in to comment.