Skip to content

Commit

Permalink
refactor: app version + add comment (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
seantking committed Jan 20, 2022
1 parent bd9aae1 commit f72e34d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/apps/29-fee/ibc_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func (im IBCModule) OnChanOpenInit(
}

// OnChanOpenTry implements the IBCModule interface
// If the channel is not fee enabled the underlying application version will be returned
// If the channel is fee enabled we merge the underlying application version with the ics29 version
func (im IBCModule) OnChanOpenTry(
ctx sdk.Context,
order channeltypes.Order,
Expand Down Expand Up @@ -86,11 +88,11 @@ func (im IBCModule) OnChanOpenTry(
return "", err
}

if im.keeper.IsFeeEnabled(ctx, portID, channelID) {
return channeltypes.MergeChannelVersions(types.Version, appVersion), nil
if !im.keeper.IsFeeEnabled(ctx, portID, channelID) {
return appVersion, nil
}

return appVersion, nil
return channeltypes.MergeChannelVersions(types.Version, appVersion), nil
}

// OnChanOpenAck implements the IBCModule interface
Expand Down

0 comments on commit f72e34d

Please sign in to comment.