Skip to content

Commit

Permalink
remove version map
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed Nov 5, 2024
1 parent ae2171b commit 667d699
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 1 addition & 4 deletions fee-abstraction/services/scaffolder/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ import (

const (
feeAbsRepo = "github.com/osmosis-labs/fee-abstraction"
feeAbsPkg = "github.com/osmosis-labs/fee-abstraction/v8"
)

var versionMap = map[uint64]string{
8: "github.com/osmosis-labs/fee-abstraction/v8",
}

type (
// options represents configuration for the message scaffolding.
options struct {
Expand Down
6 changes: 1 addition & 5 deletions fee-abstraction/services/scaffolder/scaffolder.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ func finish(ctx context.Context, session *cliui.Session, path string, version se
// Add fee-abstraction module to the go.mod
session.StartSpinner("Downloading fee abstraction module...")

pkgVersion, ok := versionMap[version.Major]
if !ok {
return errors.Errorf("version %d not supported", version.Major)
}
URL := fmt.Sprintf("%s@v%s", pkgVersion, version.String())
URL := fmt.Sprintf("%s@v%s", feeAbsPkg, version.String())
if err := gocmd.Get(ctx, path, []string{URL}); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion rollkit/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ require (
github.com/gobuffalo/plush/v4 v4.1.19
github.com/hashicorp/go-plugin v1.6.0
github.com/ignite/cli/v28 v28.5.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.9.0
)

Expand Down Expand Up @@ -177,6 +176,7 @@ require (
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
Expand Down

0 comments on commit 667d699

Please sign in to comment.