diff --git a/modules/apps/27-interchain-accounts/keeper/keeper_test.go b/modules/apps/27-interchain-accounts/keeper/keeper_test.go index cf3aca35f96..118d38a7f9a 100644 --- a/modules/apps/27-interchain-accounts/keeper/keeper_test.go +++ b/modules/apps/27-interchain-accounts/keeper/keeper_test.go @@ -16,7 +16,7 @@ var ( // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" // TestPortID defines a resuable port identifier for testing purposes - TestPortID = fmt.Sprintf("ics-27-0-0-%s", TestOwnerAddress) + TestPortID = fmt.Sprintf("%s-0-0-%s", types.VersionPrefix, TestOwnerAddress) // TestVersion defines a resuable interchainaccounts version string for testing purposes TestVersion = types.NewAppVersion(types.VersionPrefix, types.GenerateAddress(TestPortID).String()) ) diff --git a/modules/apps/27-interchain-accounts/module_test.go b/modules/apps/27-interchain-accounts/module_test.go index af5ea30eb7b..7539d216f70 100644 --- a/modules/apps/27-interchain-accounts/module_test.go +++ b/modules/apps/27-interchain-accounts/module_test.go @@ -15,7 +15,7 @@ var ( // TestOwnerAddress defines a reusable bech32 address for testing purposes TestOwnerAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" // TestPortID defines a resuable port identifier for testing purposes - TestPortID = fmt.Sprintf("ics-27-0-0-%s", TestOwnerAddress) + TestPortID = fmt.Sprintf("%s-0-0-%s", types.VersionPrefix, TestOwnerAddress) // TestVersion defines a resuable interchainaccounts version string for testing purposes TestVersion = types.NewAppVersion(types.VersionPrefix, types.GenerateAddress(TestPortID).String()) ) diff --git a/modules/apps/27-interchain-accounts/types/account.go b/modules/apps/27-interchain-accounts/types/account.go index db44d4acf14..9a3c0acf29c 100644 --- a/modules/apps/27-interchain-accounts/types/account.go +++ b/modules/apps/27-interchain-accounts/types/account.go @@ -15,10 +15,6 @@ import ( connectiontypes "github.com/cosmos/ibc-go/v2/modules/core/03-connection/types" ) -const ( - ICAPrefix string = "ics-27" -) - // GenerateAddress returns an sdk.AccAddress using the provided port identifier func GenerateAddress(portID string) sdk.AccAddress { return sdk.AccAddress(tmhash.SumTruncated([]byte(portID))) @@ -50,7 +46,7 @@ func GeneratePortID(owner, connectionID, counterpartyConnectionID string) (strin return "", sdkerrors.Wrap(err, "invalid counterparty connection identifier") } - return fmt.Sprintf("%s-%d-%d-%s", ICAPrefix, connectionSeq, counterpartyConnectionSeq, owner), nil + return fmt.Sprintf("%s-%d-%d-%s", VersionPrefix, connectionSeq, counterpartyConnectionSeq, owner), nil } type InterchainAccountI interface { diff --git a/modules/apps/27-interchain-accounts/types/account_test.go b/modules/apps/27-interchain-accounts/types/account_test.go index 54a42759b26..6baa602edc2 100644 --- a/modules/apps/27-interchain-accounts/types/account_test.go +++ b/modules/apps/27-interchain-accounts/types/account_test.go @@ -59,7 +59,7 @@ func (suite *TypesTestSuite) TestGeneratePortID() { { "success", func() {}, - fmt.Sprintf("ics-27-0-0-%s", TestOwnerAddress), + fmt.Sprintf("%s-0-0-%s", types.VersionPrefix, TestOwnerAddress), true, }, { @@ -67,7 +67,7 @@ func (suite *TypesTestSuite) TestGeneratePortID() { func() { path.EndpointA.ConnectionID = "connection-1" }, - fmt.Sprintf("ics-27-1-0-%s", TestOwnerAddress), + fmt.Sprintf("%s-1-0-%s", types.VersionPrefix, TestOwnerAddress), true, }, {