Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Run make lint-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
foxytanuki committed Dec 22, 2023
1 parent f969575 commit 6a12cc9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package cli
import (
"strconv"

"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"

"github.com/mycel-domain/mycel/x/registry/types"
"github.com/spf13/cobra"
)

var _ = strconv.Itoa(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/mycel-domain/mycel/x/registry/types"
)

Expand Down
2 changes: 1 addition & 1 deletion x/registry/module_simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
// TODO: Determine the simulation weight value
defaultWeightMsgUpdateTextRecord int = 100

opWeightMsgUpdateTopLevelDomainRegistrationPolicy = "op_weight_msg_update_top_level_domain_registration_policy"
opWeightMsgUpdateTopLevelDomainRegistrationPolicy = "op_weight_msg_update_top_level_domain_registration_policy" //#nosec G101
// TODO: Determine the simulation weight value
defaultWeightMsgUpdateTopLevelDomainRegistrationPolicy int = 100

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

"github.com/mycel-domain/mycel/x/registry/keeper"
"github.com/mycel-domain/mycel/x/registry/types"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

import (
errorsmod "cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
Expand Down Expand Up @@ -41,7 +43,7 @@ func (msg *MsgUpdateTopLevelDomainRegistrationPolicy) GetSignBytes() []byte {
func (msg *MsgUpdateTopLevelDomainRegistrationPolicy) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err)
}
return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package types
import (
"testing"

"github.com/stretchr/testify/require"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/mycel-domain/mycel/testutil/sample"
"github.com/stretchr/testify/require"
)

func TestMsgUpdateTopLevelDomainRegistrationPolicy_ValidateBasic(t *testing.T) {
Expand Down

0 comments on commit 6a12cc9

Please sign in to comment.