From 7135a07a54c95e47a34974c6d56dd202abf4f5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 28 Feb 2022 13:36:22 +0100 Subject: [PATCH] chore: switch code ordering --- modules/apps/29-fee/ibc_module.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/apps/29-fee/ibc_module.go b/modules/apps/29-fee/ibc_module.go index e8a4a45fd40..bdb3bcadabd 100644 --- a/modules/apps/29-fee/ibc_module.go +++ b/modules/apps/29-fee/ibc_module.go @@ -143,6 +143,10 @@ func (im IBCModule) OnChanCloseInit( portID, channelID string, ) error { + if err := im.app.OnChanCloseInit(ctx, portID, channelID); err != nil { + return err + } + // delete fee enabled on channel // and refund any remaining fees escrowed on channel im.keeper.DeleteFeeEnabled(ctx, portID, channelID) @@ -157,7 +161,8 @@ func (im IBCModule) OnChanCloseInit( if err != nil { im.keeper.DisableAllChannels(ctx) } - return im.app.OnChanCloseInit(ctx, portID, channelID) + + return nil } // OnChanCloseConfirm implements the IBCModule interface