Skip to content

Commit

Permalink
fix: return proper error on ChanCloseInit (#59) (#60)
Browse files Browse the repository at this point in the history
(cherry picked from commit e6e359e)

Co-authored-by: Justin Tieri <[email protected]>
  • Loading branch information
mergify[bot] and jtieri authored Jul 14, 2023
1 parent bbf5af4 commit f5dd047
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/async-icq/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"cosmossdk.io/errors"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"

channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types"
Expand Down Expand Up @@ -154,7 +155,8 @@ func (im IBCModule) OnChanCloseInit(
_ string,
_ string,
) error {
return nil
// Ensure channels cannot be closed by users
return errors.Wrap(sdkerrors.ErrInvalidRequest, "user cannot close channel")
}

// OnChanCloseConfirm implements the IBCModule interface
Expand Down

0 comments on commit f5dd047

Please sign in to comment.