Skip to content

Commit

Permalink
chore: fixup
Browse files Browse the repository at this point in the history
Signed-off-by: moul <[email protected]>
  • Loading branch information
moul committed Oct 5, 2024
1 parent 0b58baa commit 302d730
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gno.land/pkg/sdk/vm/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ func (vm *VMKeeper) AddPackage(ctx sdk.Context, msg MsgAddPackage) (err error) {
if err := msg.Package.Validate(); err != nil {
return ErrInvalidPkgPath(err.Error())
}
if path := msg.Package.Path; !strings.HasPrefix(path, vm.domain+"/") {
return ErrInvalidPkgPath("invalid domain")
if !strings.HasPrefix(pkgPath, vm.domain+"/") {
return ErrInvalidPkgPath("invalid domain: " + pkgPath)
}
if pv := gnostore.GetPackage(pkgPath, false); pv != nil {
return ErrPkgAlreadyExists("package already exists: " + pkgPath)
Expand Down

0 comments on commit 302d730

Please sign in to comment.