From 2e6dff80c57d0ef26f54ee35116db77d41116d59 Mon Sep 17 00:00:00 2001 From: lukema95 <867273263@qq.com> Date: Tue, 5 Dec 2023 15:23:45 +0800 Subject: [PATCH] docs: remove incorrect code examples --- docs/docs/01-ibc/04-middleware/02-develop.md | 38 -------------------- 1 file changed, 38 deletions(-) diff --git a/docs/docs/01-ibc/04-middleware/02-develop.md b/docs/docs/01-ibc/04-middleware/02-develop.md index aff2a14b076..3d37491d03c 100644 --- a/docs/docs/01-ibc/04-middleware/02-develop.md +++ b/docs/docs/01-ibc/04-middleware/02-develop.md @@ -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(