Skip to content

Commit

Permalink
fix: set x/profiles keeper of msg server into reference as DesmosApp (
Browse files Browse the repository at this point in the history
#1222)

## Description

Currently, `x/profiles` msg server is not a reference as DesmosApp and
it is registered before setting IBC keepers. It occurs panics since
there is no IBC features inside `x/profiles` msg server.

To fix it, we should set keeper of msg server into reference as
DesmosApp, then the IBC keepers can be properly set.

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR
Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration
[tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable
and please add
your handle next to the items reviewed if you only reviewed selected
items.*

I have...

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
dadamu authored Aug 30, 2023
1 parent c6179fa commit 16fcf97
Show file tree
Hide file tree
Showing 26 changed files with 105 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
module: x/profiles
pull_request: 1222
description: Set `x/profiles` keeper of msg server into reference as DesmosApp
backward_compatible: true
date: 2023-08-30T15:39:08.119704027Z
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func NewDesmosApp(
appOpts,
app.GRPCQueryRouter(),
app.appCodec,
*app.ProfilesKeeper,
app.ProfilesKeeper,
*app.SubspacesKeeper,
app.RelationshipsKeeper,
*app.PostsKeeper,
Expand Down
2 changes: 1 addition & 1 deletion app/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func GetWasmOpts(
appOpts servertypes.AppOptions,
grpcQueryRouter *baseapp.GRPCQueryRouter,
cdc codec.Codec,
profilesKeeper profileskeeper.Keeper,
profilesKeeper *profileskeeper.Keeper,
subspacesKeeper subspaceskeeper.Keeper,
relationshipsKeeper relationshipskeeper.Keeper,
postsKeeper postskeeper.Keeper,
Expand Down
12 changes: 12 additions & 0 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
)

func TestCheckProfilesKeeper(t *testing.T) {
db := dbm.NewMemDB()
app := NewDesmosApp(
log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true,
simtestutil.NewAppOptionsWithFlagHome(t.TempDir()),
)

require.Equal(t, app.IBCKeeper.ChannelKeeper, app.ProfilesKeeper.ChannelKeeper)
require.Equal(t, &app.IBCKeeper.PortKeeper, app.ProfilesKeeper.PortKeeper)
require.Equal(t, app.ScopedProfilesKeeper, app.ProfilesKeeper.ScopedKeeper)
}

func TestSimAppExportAndBlockedAddrs(t *testing.T) {
db := dbm.NewMemDB()
app := NewDesmosApp(
Expand Down
2 changes: 1 addition & 1 deletion app/wasm_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewDesmosWasmGasRegister() wasmkeeper.WasmGasRegister {
func NewDesmosCustomQueryPlugin(
cdc codec.Codec,
grpcQueryRouter *baseapp.GRPCQueryRouter,
profilesKeeper profileskeeper.Keeper,
profilesKeeper *profileskeeper.Keeper,
subspacesKeeper subspaceskeeper.Keeper,
relationshipsKeeper relationshipskeeper.Keeper,
postsKeeper postskeeper.Keeper,
Expand Down
2 changes: 1 addition & 1 deletion x/profiles/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// BeginBlocker is called every block, processes expired application links
func BeginBlocker(ctx sdk.Context, keeper keeper.Keeper) {
func BeginBlocker(ctx sdk.Context, keeper *keeper.Keeper) {
// Iterate over all the expiring application links
keeper.IterateExpiringApplicationLinks(ctx, func(link types.ApplicationLink) (stop bool) {
// Delete the application link
Expand Down
2 changes: 1 addition & 1 deletion x/profiles/abci_benchmarks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/desmos-labs/desmos/v6/x/profiles/types"
)

func setupBenchTest() (sdk.Context, authkeeper.AccountKeeper, keeper.Keeper) {
func setupBenchTest() (sdk.Context, authkeeper.AccountKeeper, *keeper.Keeper) {
// Define the store keys
keys := sdk.NewKVStoreKeys(types.StoreKey, authtypes.StoreKey, paramstypes.StoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
Expand Down
2 changes: 1 addition & 1 deletion x/profiles/keeper/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type KeeperTestSuite struct {
legacyAminoCdc *codec.LegacyAmino
ctx sdk.Context
storeKey storetypes.StoreKey
k keeper.Keeper
k *keeper.Keeper
ak authkeeper.AccountKeeper

rk *testutil.MockRelationshipsKeeper
Expand Down
12 changes: 6 additions & 6 deletions x/profiles/keeper/invariants.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
)

// RegisterInvariants registers all posts invariants
func RegisterInvariants(ir sdk.InvariantRegistry, keeper Keeper) {
func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper) {
ir.RegisterRoute(types.ModuleName, "valid-profiles", ValidProfilesInvariant(keeper))
ir.RegisterRoute(types.ModuleName, "valid-dtag-transfer-requests", ValidDTagTransferRequests(keeper))
ir.RegisterRoute(types.ModuleName, "valid-chain-links", ValidChainLinks(keeper))
ir.RegisterRoute(types.ModuleName, "valid-application-links", ValidApplicationLinks(keeper))
}

func AllInvariants(k Keeper) sdk.Invariant {
func AllInvariants(k *Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
res, broken := ValidProfilesInvariant(k)(ctx)
if broken {
Expand All @@ -43,7 +43,7 @@ func AllInvariants(k Keeper) sdk.Invariant {
}

// ValidProfilesInvariant checks that all registered Profiles have a non-empty DTag and a non-empty creator
func ValidProfilesInvariant(k Keeper) sdk.Invariant {
func ValidProfilesInvariant(k *Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
var invalidProfiles []*types.Profile
k.IterateProfiles(ctx, func(profile *types.Profile) (stop bool) {
Expand Down Expand Up @@ -75,7 +75,7 @@ func formatOutputProfiles(invalidProfiles []*types.Profile) (outputProfiles stri

// ValidDTagTransferRequests checks that all DTag transfer requests are associated with a recipient that has a profile
// and they have not been made from the same user towards the same user
func ValidDTagTransferRequests(k Keeper) sdk.Invariant {
func ValidDTagTransferRequests(k *Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
var invalidDTagTransferRequests []types.DTagTransferRequest
k.IterateDTagTransferRequests(ctx, func(request types.DTagTransferRequest) (stop bool) {
Expand Down Expand Up @@ -106,7 +106,7 @@ func formatOutputDTagTransferRequests(requests []types.DTagTransferRequest) (out
// --------------------------------------------------------------------------------------------------------------------

// ValidChainLinks checks that all chain links are associated with a user that has a profile
func ValidChainLinks(k Keeper) sdk.Invariant {
func ValidChainLinks(k *Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
var invalidChainLinks []types.ChainLink
k.IterateChainLinks(ctx, func(link types.ChainLink) (stop bool) {
Expand Down Expand Up @@ -138,7 +138,7 @@ func formatOutputChainLinks(links []types.ChainLink) (output string) {
// --------------------------------------------------------------------------------------------------------------------

// ValidApplicationLinks checks that all application links are associated with a user that has a profile
func ValidApplicationLinks(k Keeper) sdk.Invariant {
func ValidApplicationLinks(k *Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
var invalidApplicationLinks []types.ApplicationLink
k.IterateApplicationLinks(ctx, func(link types.ApplicationLink) (stop bool) {
Expand Down
22 changes: 11 additions & 11 deletions x/profiles/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ type Keeper struct {
ak authkeeper.AccountKeeper
rk types.RelationshipsKeeper

channelKeeper types.ChannelKeeper
portKeeper types.PortKeeper
scopedKeeper types.ScopedKeeper
ChannelKeeper types.ChannelKeeper
PortKeeper types.PortKeeper
ScopedKeeper types.ScopedKeeper

// the address capable of executing a MsgUpdateParams message. Typically, this
// should be the x/gov module account.
Expand All @@ -55,17 +55,17 @@ func NewKeeper(
portKeeper types.PortKeeper,
scopedKeeper types.ScopedKeeper,
authority string,
) Keeper {
return Keeper{
) *Keeper {
return &Keeper{
storeKey: storeKey,
cdc: cdc,
legacyAmino: legacyAmino,
ak: ak,
rk: rk,

channelKeeper: channelKeeper,
portKeeper: portKeeper,
scopedKeeper: scopedKeeper,
ChannelKeeper: channelKeeper,
PortKeeper: portKeeper,
ScopedKeeper: scopedKeeper,

authority: authority,
}
Expand All @@ -77,9 +77,9 @@ func (k *Keeper) SetIBCKeepers(
portKeeper types.PortKeeper,
scopedKeeper types.ScopedKeeper,
) {
k.channelKeeper = channelKeeper
k.portKeeper = portKeeper
k.scopedKeeper = scopedKeeper
k.ChannelKeeper = channelKeeper
k.PortKeeper = portKeeper
k.ScopedKeeper = scopedKeeper
}

// Logger returns a module-specific logger.
Expand Down
8 changes: 4 additions & 4 deletions x/profiles/keeper/keeper_ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import (

// IsBound checks if the module is already bound to the desired port
func (k Keeper) IsBound(ctx sdk.Context, portID string) bool {
_, ok := k.scopedKeeper.GetCapability(ctx, host.PortPath(portID))
_, ok := k.ScopedKeeper.GetCapability(ctx, host.PortPath(portID))
return ok
}

// BindPort defines a wrapper function for the port Keeper's function in
// order to expose it to module's InitGenesis function
func (k Keeper) BindPort(ctx sdk.Context, portID string) error {
capability := k.portKeeper.BindPort(ctx, portID)
capability := k.PortKeeper.BindPort(ctx, portID)
return k.ClaimCapability(ctx, capability, host.PortPath(portID))
}

Expand All @@ -38,10 +38,10 @@ func (k Keeper) SetPort(ctx sdk.Context, portID string) {

// AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool {
return k.scopedKeeper.AuthenticateCapability(ctx, cap, name)
return k.ScopedKeeper.AuthenticateCapability(ctx, cap, name)
}

// ClaimCapability wraps the scopedKeeper's ClaimCapability method
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error {
return k.scopedKeeper.ClaimCapability(ctx, cap, name)
return k.ScopedKeeper.ClaimCapability(ctx, cap, name)
}
4 changes: 2 additions & 2 deletions x/profiles/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (

// Migrator is a struct for handling in-place store migrations.
type Migrator struct {
keeper Keeper
keeper *Keeper
ak authkeeper.AccountKeeper

legacySubspace types.ParamsSubspace
}

// NewMigrator returns a new Migrator
func NewMigrator(ak authkeeper.AccountKeeper, keeper Keeper, legacySubspace types.ParamsSubspace) Migrator {
func NewMigrator(ak authkeeper.AccountKeeper, keeper *Keeper, legacySubspace types.ParamsSubspace) Migrator {
return Migrator{
keeper: keeper,
ak: ak,
Expand Down
2 changes: 1 addition & 1 deletion x/profiles/keeper/msg_server_app_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (k Keeper) LinkApplication(
}

// UnlinkApplication defines a rpc method for MsgUnlinkApplication
func (k msgServer) UnlinkApplication(
func (k MsgServer) UnlinkApplication(
goCtx context.Context, msg *types.MsgUnlinkApplication,
) (*types.MsgUnlinkApplicationResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
Expand Down
6 changes: 3 additions & 3 deletions x/profiles/keeper/msg_server_chain_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// LinkChainAccount defines a rpc method for MsgLinkChainAccount
func (k msgServer) LinkChainAccount(goCtx context.Context, msg *types.MsgLinkChainAccount) (*types.MsgLinkChainAccountResponse, error) {
func (k MsgServer) LinkChainAccount(goCtx context.Context, msg *types.MsgLinkChainAccount) (*types.MsgLinkChainAccountResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

srcAddrData, err := types.UnpackAddressData(k.cdc, msg.ChainAddress)
Expand Down Expand Up @@ -47,7 +47,7 @@ func (k msgServer) LinkChainAccount(goCtx context.Context, msg *types.MsgLinkCha
}

// UnlinkChainAccount defines a rpc method for MsgUnlinkChainAccount
func (k msgServer) UnlinkChainAccount(goCtx context.Context, msg *types.MsgUnlinkChainAccount) (*types.MsgUnlinkChainAccountResponse, error) {
func (k MsgServer) UnlinkChainAccount(goCtx context.Context, msg *types.MsgUnlinkChainAccount) (*types.MsgUnlinkChainAccountResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// Get the chain link
Expand Down Expand Up @@ -78,7 +78,7 @@ func (k msgServer) UnlinkChainAccount(goCtx context.Context, msg *types.MsgUnlin
}

// SetDefaultExternalAddress defines a rpc method for MsgSetDefaultExternalAddress
func (k msgServer) SetDefaultExternalAddress(goCtx context.Context, msg *types.MsgSetDefaultExternalAddress) (*types.MsgSetDefaultExternalAddressResponse, error) {
func (k MsgServer) SetDefaultExternalAddress(goCtx context.Context, msg *types.MsgSetDefaultExternalAddress) (*types.MsgSetDefaultExternalAddressResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// Get the chain link
Expand Down
8 changes: 4 additions & 4 deletions x/profiles/keeper/msg_server_dtag_transfers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// RequestDTagTransfer defines a rpc method for MsgRequestDTagTransfer
func (k msgServer) RequestDTagTransfer(goCtx context.Context, msg *types.MsgRequestDTagTransfer) (*types.MsgRequestDTagTransferResponse, error) {
func (k MsgServer) RequestDTagTransfer(goCtx context.Context, msg *types.MsgRequestDTagTransfer) (*types.MsgRequestDTagTransferResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// Check if the request's receiver has blocked the sender before
Expand Down Expand Up @@ -63,7 +63,7 @@ func (k msgServer) RequestDTagTransfer(goCtx context.Context, msg *types.MsgRequ
}

// CancelDTagTransferRequest defines a rpc method for MsgCancelDTagTransferRequest
func (k msgServer) CancelDTagTransferRequest(goCtx context.Context, msg *types.MsgCancelDTagTransferRequest) (*types.MsgCancelDTagTransferRequestResponse, error) {
func (k MsgServer) CancelDTagTransferRequest(goCtx context.Context, msg *types.MsgCancelDTagTransferRequest) (*types.MsgCancelDTagTransferRequestResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// Check if the request exists
Expand Down Expand Up @@ -92,7 +92,7 @@ func (k msgServer) CancelDTagTransferRequest(goCtx context.Context, msg *types.M
}

// AcceptDTagTransferRequest defines a rpc method for MsgAcceptDTagTransferRequest
func (k msgServer) AcceptDTagTransferRequest(goCtx context.Context, msg *types.MsgAcceptDTagTransferRequest) (*types.MsgAcceptDTagTransferRequestResponse, error) {
func (k MsgServer) AcceptDTagTransferRequest(goCtx context.Context, msg *types.MsgAcceptDTagTransferRequest) (*types.MsgAcceptDTagTransferRequestResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

request, found, err := k.GetDTagTransferRequest(ctx, msg.Sender, msg.Receiver)
Expand Down Expand Up @@ -200,7 +200,7 @@ func (k msgServer) AcceptDTagTransferRequest(goCtx context.Context, msg *types.M
}

// RefuseDTagTransferRequest defines a rpc method for MsgRefuseDTagTransferRequest
func (k msgServer) RefuseDTagTransferRequest(goCtx context.Context, msg *types.MsgRefuseDTagTransferRequest) (*types.MsgRefuseDTagTransferRequestResponse, error) {
func (k MsgServer) RefuseDTagTransferRequest(goCtx context.Context, msg *types.MsgRefuseDTagTransferRequest) (*types.MsgRefuseDTagTransferRequestResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

// Check if the request exists
Expand Down
2 changes: 1 addition & 1 deletion x/profiles/keeper/msg_server_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// UpdateParams updates the module parameters
func (m msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
func (m MsgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
authority := m.authority
if authority != msg.Authority {
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", authority, msg.Authority)
Expand Down
15 changes: 8 additions & 7 deletions x/profiles/keeper/msgs_server_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ import (
"github.com/desmos-labs/desmos/v6/x/profiles/types"
)

var _ types.MsgServer = &msgServer{}
var _ types.MsgServer = &MsgServer{}

type msgServer struct {
Keeper
type MsgServer struct {
// To ensure setting IBC keepers properly, keeper must be a reference as DesmosApp
*Keeper
}

// NewMsgServerImpl returns an implementation of the profiles MsgServer interface
// for the provided Keeper.
func NewMsgServerImpl(keeper Keeper) types.MsgServer {
return &msgServer{keeper}
func NewMsgServerImpl(keeper *Keeper) types.MsgServer {
return &MsgServer{keeper}
}

// SaveProfile defines a rpc method for MsgSaveProfile
func (k msgServer) SaveProfile(goCtx context.Context, msg *types.MsgSaveProfile) (*types.MsgSaveProfileResponse, error) {
func (k MsgServer) SaveProfile(goCtx context.Context, msg *types.MsgSaveProfile) (*types.MsgSaveProfileResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

profile, found, err := k.GetProfile(ctx, msg.Creator)
Expand Down Expand Up @@ -87,7 +88,7 @@ func (k msgServer) SaveProfile(goCtx context.Context, msg *types.MsgSaveProfile)
}

// DeleteProfile defines a rpc method for MsgDeleteProfile
func (k msgServer) DeleteProfile(goCtx context.Context, msg *types.MsgDeleteProfile) (*types.MsgDeleteProfileResponse, error) {
func (k MsgServer) DeleteProfile(goCtx context.Context, msg *types.MsgDeleteProfile) (*types.MsgDeleteProfileResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

err := k.RemoveProfile(ctx, msg.Creator)
Expand Down
9 changes: 9 additions & 0 deletions x/profiles/keeper/msgs_server_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ import (
"github.com/desmos-labs/desmos/v6/x/profiles/types"
)

func (suite *KeeperTestSuite) TestMsgServer_NewMsgServerImpl() {
suite.k.ChannelKeeper = nil
server := keeper.NewMsgServerImpl(suite.k)
suite.k.ChannelKeeper = suite.channelKeeper

// Make sure keeper set ChannelKeeper properly after msg server initialized.
suite.Require().Equal(suite.channelKeeper, server.(*keeper.MsgServer).Keeper.ChannelKeeper)
}

func (suite *KeeperTestSuite) TestMsgServer_SaveProfile() {
blockTime := time.Date(2020, 1, 1, 00, 00, 00, 000, time.UTC)
testCases := []struct {
Expand Down
6 changes: 3 additions & 3 deletions x/profiles/keeper/relay_app_links.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (k Keeper) StartProfileConnection(
timeoutHeight clienttypes.Height,
timeoutTimestamp uint64,
) error {
sourceChannelEnd, found := k.channelKeeper.GetChannel(ctx, sourcePort, sourceChannel)
sourceChannelEnd, found := k.ChannelKeeper.GetChannel(ctx, sourcePort, sourceChannel)
if !found {
return errors.Wrapf(channeltypes.ErrChannelNotFound, "port ID (%s) channel ID (%s)", sourcePort, sourceChannel)
}
Expand All @@ -56,7 +56,7 @@ func (k Keeper) StartProfileConnection(
destinationChannel := sourceChannelEnd.GetCounterparty().GetChannelID()

// Begin createOutgoingPacket logic
channelCap, ok := k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(sourcePort, sourceChannel))
channelCap, ok := k.ScopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(sourcePort, sourceChannel))
if !ok {
return errors.Wrap(channeltypes.ErrChannelCapabilityNotFound, "module does not own channel capability")
}
Expand Down Expand Up @@ -90,7 +90,7 @@ func (k Keeper) StartProfileConnection(
)

// Send the IBC packet
_, err = k.channelKeeper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetData.GetBytes())
_, err = k.ChannelKeeper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetData.GetBytes())
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit 16fcf97

Please sign in to comment.