Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alias adding in Dependency Manager if no dependency yet #1836

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions internal/dependencymanager/dependencyinstaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,12 @@ func (di *DependencyInstaller) handleFoundContract(networkName, contractAddr, as
}
}

err := di.updateDependencyState(networkName, contractAddr, assignedName, contractName, originalContractDataHash)
if err != nil {
di.Logger.Error(fmt.Sprintf("Error updating state: %v", err))
return err
}

// Needs to happen before handleFileSystem
if !di.contractFileExists(contractAddr, contractName) {
err := di.handleAdditionalDependencyTasks(networkName, contractName)
Expand All @@ -455,17 +461,11 @@ func (di *DependencyInstaller) handleFoundContract(networkName, contractAddr, as
}
}

err := di.handleFileSystem(contractAddr, contractName, contractData, networkName)
err = di.handleFileSystem(contractAddr, contractName, contractData, networkName)
if err != nil {
return fmt.Errorf("error handling file system: %w", err)
}

err = di.updateDependencyState(networkName, contractAddr, assignedName, contractName, originalContractDataHash)
if err != nil {
di.Logger.Error(fmt.Sprintf("Error updating state: %v", err))
return err
}

return nil
}

Expand Down
Loading