Skip to content

Commit

Permalink
enable: unnecessary check removed (#61)
Browse files Browse the repository at this point in the history
* enable: unnecessary check removed

* enable: unnecessary check removed clean up
  • Loading branch information
zo-el authored Aug 6, 2024
1 parent af849ec commit cf75007
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
8 changes: 1 addition & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,7 @@ pub async fn run(config: &Config) -> Result<()> {

let is_host_kyc_level_2 = host_credentials.clone().kyc == KycLevel::Level2;

install_holo_hosted_happs(
&mut core_app,
config.admin_port,
&published_happs,
is_host_kyc_level_2,
)
.await?;
install_holo_hosted_happs(config.admin_port, &published_happs, is_host_kyc_level_2).await?;

handle_ineligible_happs(
&mut core_app,
Expand Down
16 changes: 0 additions & 16 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ pub async fn should_be_enabled(

/// Installs anonymous instance for all happs that are eligible for hosting
pub async fn install_holo_hosted_happs(
core_app_client: &mut CoreAppAgent,
admin_port: u16,
happs: &[HappBundle],
is_kyc_level_2: bool,
Expand Down Expand Up @@ -310,21 +309,6 @@ pub async fn install_holo_hosted_happs(
happ_id
);
admin_websocket.disable_app(&happ_id.to_string()).await?;
} else {
// Check if happ is eligible to be holo-enabled for host and if so, holo-enable happ
if is_kyc_level_2 {
trace!("Enabling happ {} for holo hosting", happ_id);
let holoport_id = get_holoport_id().await?;
// Questions: if its here does this not mean that the happ is already enabled?
core_app_client
.holo_enable_happ(happ_id, &holoport_id)
.await?;
} else {
trace!(
"Not holo-enabling {} app due to failed price check for kyc level",
happ_id
);
}
}
}
// If the expected happ is disabled by the host, we don't install
Expand Down

0 comments on commit cf75007

Please sign in to comment.