From e51e2c9917c5786135414ba9fa32fd47efe61b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Tue, 1 Mar 2022 14:57:47 +0100 Subject: [PATCH] chore: switch code ordering (#1025) --- 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