Skip to content

Commit

Permalink
remove port prefix requirement (backport cosmos#2590) (cosmos#2633)
Browse files Browse the repository at this point in the history
* remove port prefix requirement (cosmos#2590)

* remove port prefix requirement

* chore: remove depcrated test and fix lint

* add changelog entry

* Update CHANGELOG.md

Co-authored-by: Damian Nolan <damiannolan@gmail.com>

Co-authored-by: Damian Nolan <damiannolan@gmail.com>
(cherry picked from commit 5f9966b)

# Conflicts:
#	modules/apps/27-interchain-accounts/host/keeper/handshake.go

* fix conflict

Co-authored-by: LaurensKubat <32776056+LaurensKubat@users.noreply.github.com>
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
  • Loading branch information
3 people authored and ulbqb committed Jul 31, 2023
1 parent 6662cbd commit f8a268c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### State Machine Breaking

* (27-interchain-accounts) [\#2580](https://github.com/cosmos/ibc-go/issues/2580) Removing port prefix requirement from the ICA host channel handshake
* (transfer) [\#2377](https://github.com/cosmos/ibc-go/pull/2377) Adding `sequence` to `MsgTransferResponse`.

### Improvements
Expand Down
5 changes: 0 additions & 5 deletions modules/apps/27-interchain-accounts/host/keeper/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package keeper

import (
"fmt"
"strings"

sdk "github.com/Finschia/finschia-sdk/types"
sdkerrors "github.com/Finschia/finschia-sdk/types/errors"
Expand Down Expand Up @@ -35,10 +34,6 @@ func (k Keeper) OnChanOpenTry(
return "", sdkerrors.Wrapf(icatypes.ErrInvalidHostPort, "expected %s, got %s", icatypes.PortID, portID)
}

if !strings.HasPrefix(counterparty.PortId, icatypes.PortPrefix) {
return "", sdkerrors.Wrapf(icatypes.ErrInvalidControllerPort, "expected %s{owner-account-address}, got %s", icatypes.PortPrefix, counterparty.PortId)
}

var metadata icatypes.Metadata
if err := icatypes.ModuleCdc.UnmarshalJSON([]byte(counterpartyVersion), &metadata); err != nil {
return "", sdkerrors.Wrapf(icatypes.ErrUnknownDataType, "cannot unmarshal ICS-27 interchain accounts metadata")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,6 @@ func (suite *KeeperTestSuite) TestOnChanOpenTry() {
},
false,
},
{
"invalid counterparty port ID",
func() {
channel.Counterparty.PortId = "invalid-port-id"
},
false,
},
{
"connection not found",
func() {
Expand Down

0 comments on commit f8a268c

Please sign in to comment.