Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine minor improvements #239

Merged
merged 9 commits into from
Oct 3, 2023
2 changes: 1 addition & 1 deletion custom/bank/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewBaseKeeper(
authority string,
) Keeper {
keeper := Keeper{
BaseKeeper: bankkeeper.NewBaseKeeper(cdc, storeKey, ak, blockedAddrs, authority), // TODO: how to set authority?
BaseKeeper: bankkeeper.NewBaseKeeper(cdc, storeKey, ak, blockedAddrs, authority),
ak: alliancekeeper.Keeper{},
sk: stakingkeeper.Keeper{},
tfmk: tfmk,
Expand Down
4 changes: 0 additions & 4 deletions x/mint/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ func (ms msgServer) FundModuleAccount(goCtx context.Context, req *types.MsgFundM

func (ms msgServer) AddAccountToFundModuleSet(goCtx context.Context, req *types.MsgAddAccountToFundModuleSet) (*types.MsgAddAccountToFundModuleSetResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
err := req.ValidateBasic()
if err != nil {
return nil, errorsmod.Wrapf(types.ErrValidationMsg, "invalid req msg %v - err %v", req, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! we don't duplicate SDK process!

}

if ms.authority != req.Authority {
return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, req.Authority)
Expand Down
6 changes: 3 additions & 3 deletions x/mint/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ func (m MsgAddAccountToFundModuleSet) GetSignBytes() []byte {

// ValidateBasic does a sanity check on the provided data.
func (m MsgAddAccountToFundModuleSet) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(m.AllowedAddress)
_, err := sdk.AccAddressFromBech32(m.Authority)
if err != nil {
return errorsmod.Wrap(err, "from address must be valid address")
return errorsmod.Wrap(err, "authority must be valid address")
}

_, err = sdk.AccAddressFromBech32(m.AllowedAddress)
if err != nil {
return errorsmod.Wrap(err, "from address must be valid address")
return errorsmod.Wrap(err, "allowed address must be valid address")
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion x/ratelimit/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// GetTxCmd returns the tx commands for router
func GetTxCmd() *cobra.Command {
txCmd := &cobra.Command{
Use: "transfermiddleware",
Use: types.ModuleName,
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
Short: fmt.Sprintf("Tx commands for the %s module", types.ModuleName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// GetQueryCmd returns the query commands for router
func GetQueryCmd() *cobra.Command {
queryCmd := &cobra.Command{
Use: "transfermiddleware",
Use: types.ModuleName,
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
}
Expand Down
2 changes: 1 addition & 1 deletion x/transfermiddleware/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// GetTxCmd returns the tx commands for router
func GetTxCmd() *cobra.Command {
txCmd := &cobra.Command{
Use: "transfermiddleware",
Use: types.ModuleName,
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
Short: "Registry and remove IBC dotsama chain information",
Expand Down