Skip to content

Commit

Permalink
Add message if added to flow.json
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Jan 17, 2024
1 parent b92f6d8 commit d44d411
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/dependencymanager/dependencyinstaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,18 @@ func (ci *DependencyInstaller) updateState(networkName, contractAddress, assigne
Version: contractHash,
}

isNewDep := ci.State.Dependencies().ByName(dep.Name) == nil

ci.State.Dependencies().AddOrUpdate(dep)
ci.State.Contracts().AddDependencyAsContract(dep, networkName)
err := ci.State.SaveDefault()
if err != nil {
return err
}

if isNewDep {
ci.Logger.Info(fmt.Sprintf("Dependency Manager: %s added to flow.json", dep.Name))
}

return nil
}

0 comments on commit d44d411

Please sign in to comment.