Skip to content

Commit

Permalink
add callback
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-nguy committed Aug 27, 2021
1 parent 5dfaf88 commit 5dabfe5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions modules/apps/transfer/keeper/callbacks.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
"github.com/cosmos/ibc-go/modules/core/exported"
)

// SendPacket is called by a module in order to send an IBC packet on a channel
// end owned by the calling module to the corresponding module on the counterparty
// chain.
func (k Keeper) SendPacket(
ctx sdk.Context,
channelCap *capabilitytypes.Capability,
packet exported.PacketI,
) error {
//todo
return k.channelKeeper.SendPacket(ctx, channelCap, packet)
}
2 changes: 1 addition & 1 deletion modules/apps/transfer/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (am AppModule) OnChanOpenInit(
transferVersion = appVersion
}

if err := ValidateTransferChannelParams(ctx, am.keeper, order, portID, channelID, appVersion); err != nil {
if err := ValidateTransferChannelParams(ctx, am.keeper, order, portID, channelID, transferVersion); err != nil {
return err
}

Expand Down

0 comments on commit 5dabfe5

Please sign in to comment.