From 881276fd33725a75ea1fb9af36c187b8c6ea4e87 Mon Sep 17 00:00:00 2001 From: Sean King Date: Mon, 9 Aug 2021 11:42:11 +0200 Subject: [PATCH] fix: updating port-id & fixing OnChanOpenInit bug (#321) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: updating port-id & fixing OnChanOpenInit bug * Update modules/apps/27-interchain-accounts/keeper/handshake.go Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> --- modules/apps/27-interchain-accounts/keeper/handshake.go | 5 +++-- modules/apps/27-interchain-accounts/types/keys.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/apps/27-interchain-accounts/keeper/handshake.go b/modules/apps/27-interchain-accounts/keeper/handshake.go index 43a95088f37..647ef2e7d55 100644 --- a/modules/apps/27-interchain-accounts/keeper/handshake.go +++ b/modules/apps/27-interchain-accounts/keeper/handshake.go @@ -39,9 +39,10 @@ func (k Keeper) OnChanOpenInit( if version != types.Version { return sdkerrors.Wrapf(channeltypes.ErrInvalidChannelVersion, "channel version must be '%s' (%s != %s)", types.Version, version, types.Version) } - channelID, found := k.GetActiveChannel(ctx, portID) + + existingChannelID, found := k.GetActiveChannel(ctx, portID) if found { - return sdkerrors.Wrapf(porttypes.ErrInvalidPort, "existing active channel (%s) for portID (%s)", channelID, portID) + return sdkerrors.Wrapf(porttypes.ErrInvalidPort, "existing active channel (%s) for portID (%s)", existingChannelID, portID) } // Claim channel capability passed back by IBC module diff --git a/modules/apps/27-interchain-accounts/types/keys.go b/modules/apps/27-interchain-accounts/types/keys.go index ab9aac7bbe2..321bfcee458 100644 --- a/modules/apps/27-interchain-accounts/types/keys.go +++ b/modules/apps/27-interchain-accounts/types/keys.go @@ -10,7 +10,7 @@ const ( // module supports Version = "ics27-1" - PortID = "interchain-account" + PortID = "ibcaccount" StoreKey = ModuleName RouterKey = ModuleName