Skip to content
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
9 changes: 4 additions & 5 deletions internal/config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

package config

import "slices"

type Profile struct {
Network string // Cardano network name
Tld string // Top-level domain
Expand All @@ -19,11 +21,8 @@ type Profile struct {
func GetProfiles() []Profile {
var ret []Profile
for k, profile := range Profiles {
for _, tmpProfile := range globalConfig.Profiles {
if k == tmpProfile {
ret = append(ret, profile)
break
}
if slices.Contains(globalConfig.Profiles, k) {
ret = append(ret, profile)
}
}
return ret
Expand Down
Loading