Skip to content

Commit

Permalink
Return if not nimbus (#2039)
Browse files Browse the repository at this point in the history
* Return if not nimbus

* Await ensuring Nimbus connection
  • Loading branch information
dappnodedev authored Sep 25, 2024
1 parent 6c45ad8 commit 780df8f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/dappmanager/src/calls/packageInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function packageInstall({
options
});

ensureNimbusConnection(reqName);
await ensureNimbusConnection(reqName);
}

/**
Expand All @@ -41,9 +41,10 @@ export async function packageInstall({
*
* TODO: Remove this once all Nimbus packages are multiservice
*/
function ensureNimbusConnection(dnpName: string): void {
async function ensureNimbusConnection(dnpName: string): Promise<void> {
if (!dnpName.includes("nimbus")) {
logs.debug("Not a Nimbus package, skipping network reconnection");
return;
}

logs.info("Ensuring Nimbus services are connected to the staker network");
Expand All @@ -65,5 +66,5 @@ function ensureNimbusConnection(dnpName: string): void {
}

// Not awaited
consensus.persistSelectedConsensusIfInstalled(network);
await consensus.persistSelectedConsensusIfInstalled(network);
}

0 comments on commit 780df8f

Please sign in to comment.