Skip to content

Commit

Permalink
Merge pull request ComposableFi#239 from jaybxyz/jaybxyz/minor-fixes
Browse files Browse the repository at this point in the history
Refine minor improvements
  • Loading branch information
vuong177 authored Oct 3, 2023
2 parents e1c9d45 + 0d9a61b commit d54339e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
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)
}

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

0 comments on commit d54339e

Please sign in to comment.