Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: app version + add comment #750

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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