Skip to content

Commit

Permalink
configure-holochain: handle jurisdiction (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
zo-el authored Aug 22, 2024
1 parent a144d51 commit 6480985
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/configure-holochain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ pub async fn run(config: Config) -> Result<()> {
.context("failed to load hApps YAML config")?;
install_happs(&happ_file, &config).await?;

// update_host_jurisdiction_if_changed(&config).await?;
if let Err(e) = update_host_jurisdiction_if_changed(&config).await {
warn!(
"Note: This is only needed for holoports. Failed to update jurisdiction. Error: {}",
e
);
}

Ok(())
}

Expand Down Expand Up @@ -135,13 +141,7 @@ pub async fn update_host_jurisdiction_if_changed(config: &Config) -> Result<()>

// get current jurisdiction in hbs
let hbs = HbsClient::connect().await?;
let hbs_jurisdiction = match hbs.get_host_registration().await {
Ok(r) => r.jurisdiction,
Err(e) => {
debug!("Failed to get jurisdiction from hbs. Error: {}", e);
return Ok(());
}
};
let hbs_jurisdiction = hbs.get_host_registration().await?.jurisdiction;

jurisdictions::update_jurisdiction_if_changed(config, hbs_jurisdiction).await
}

0 comments on commit 6480985

Please sign in to comment.