Skip to content

Commit

Permalink
fix: return proper error on ChanCloseInit (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtieri authored Jul 14, 2023
1 parent a1e4804 commit e6e359e
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/v7/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 e6e359e

Please sign in to comment.