Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianToledano committed Mar 25, 2024
1 parent 322c79d commit efd669c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions x/gov/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking Changes

* []() Removes the use of Accouts String method:
* `NewDeposit`, `NewMsgDeposit`, `NewMsgVote`, `NewMsgVoteWeighted`, `NewVote`, `NewProposal`, `NewDeposit`, `NewMsgDeposit`, `NewMsgSubmitProposal`, `NewMsgVote`, `NewMsgVoteWeighted` now takes a string as argument instead of an `sdk.AccAddress`.
* `Prompt` and `PromptMetadata` takes an address.Codec as argument.
* [#19850](https://github.com/cosmos/cosmos-sdk/pull/19850) Removes the use of Accounts String method:
* `NewDeposit`, `NewMsgDeposit`, `NewMsgVote`, `NewMsgVoteWeighted`, `NewVote`, `NewProposal`, `NewMsgDeposit`, `NewMsgSubmitProposal`, `NewMsgVote`, `NewMsgVoteWeighted` now takes a string as argument instead of an `sdk.AccAddress`.
* `Prompt` and `PromptMetadata` take as an address.Codec as argument.
* `SetProposer` takes a String as argument instead of a `fmt.Stringer`.
* [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) Migrate module to use `appmodule.Environment`; `NewKeeper` now takes `appmodule.Environment` instead of a store service and no `baseapp.MessageRouter` anymore.
* [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) v1beta1 proposal handlers now take a `context.Context` instead of an `sdk.Context`.
Expand Down
2 changes: 1 addition & 1 deletion x/gov/client/cli/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"strconv"
"strings"

"cosmossdk.io/core/address"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"

"cosmossdk.io/core/address"
authtypes "cosmossdk.io/x/auth/types"
"cosmossdk.io/x/gov/types"

Expand Down
3 changes: 2 additions & 1 deletion x/gov/client/cli/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package cli_test

import (
"fmt"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"math"
"os"
"testing"
Expand All @@ -19,6 +18,8 @@ import (
"github.com/stretchr/testify/require"

"cosmossdk.io/x/gov/client/cli"

codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
)

type st struct {
Expand Down
2 changes: 0 additions & 2 deletions x/gov/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,9 @@ func SimulateMsgSubmitLegacyProposal(
return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "content is nil"), nil, nil
}

//govacc := k.GetGovernanceAccount(ctx)
govacc, err := ak.AddressCodec().BytesToString(k.GetGovernanceAccount(ctx).GetAddress())
if err != nil {
return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "error getting governance account address"), nil, err

}
contentMsg, err := v1.NewLegacyContent(content, govacc)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/gov/types/v1/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
)

// NewProposal creates a new Proposal instance
func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary string, proposer string, proposalType ProposalType) (Proposal, error) {
func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary, proposer string, proposalType ProposalType) (Proposal, error) {
msgs, err := sdktx.SetMsgs(messages)
if err != nil {
return Proposal{}, err
Expand Down
2 changes: 1 addition & 1 deletion x/gov/types/v1beta1/msgs_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package v1beta1

import (
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/codec"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down

0 comments on commit efd669c

Please sign in to comment.