Skip to content

Commit

Permalink
docs: remove redundant code examples (#5309)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukema95 authored and damiannolan committed Dec 5, 2023
1 parent b4f9340 commit c3ab069
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions docs/docs/01-ibc/04-middleware/02-develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,44 +121,6 @@ func (im IBCMiddleware) OnChanOpenInit(

doCustomLogic()

// if the version string is empty, OnChanOpenInit is expected to return
// a default version string representing the version(s) it supports
appVersion, err := im.app.OnChanOpenInit(
ctx,
order,
connectionHops,
portID,
channelID,
channelCap,
counterparty,
metadata.AppVersion, // note we only pass app version here
)
if err != nil {
// Since it is valid for fee version to not be specified,
// the above middleware version may be for another middleware.
// Pass the entire version string onto the underlying application.
return im.app.OnChanOpenInit(
ctx,
order,
connectionHops,
portID,
channelID,
channelCap,
counterparty,
version,
)
}
else {
metadata = {
// set middleware version to default value
MiddlewareVersion: defaultMiddlewareVersion,
// allow application to return its default version
AppVersion: "",
}
}

doCustomLogic()

// if the version string is empty, OnChanOpenInit is expected to return
// a default version string representing the version(s) it supports
appVersion, err := im.app.OnChanOpenInit(
Expand Down

0 comments on commit c3ab069

Please sign in to comment.