diff --git a/CHANGELOG.md b/CHANGELOG.md index 99d5ba22a7..43f51f19cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/foundation) [\#1283](https://github.com/Finschia/finschia-sdk/pull/1283) add init logic of foundation module accounts to InitGenesis in order to eliminate potential panic (backport #1277) * (x/collection) [\#1282](https://github.com/Finschia/finschia-sdk/pull/1282) eliminates potential risk for Insufficient Sanity Check of tokenID in Genesis (backport #1276) * (x/collection) [\#1290](https://github.com/Finschia/finschia-sdk/pull/1290) export x/collection params into genesis (backport #1268) +* (x/foundation) [\#1295](https://github.com/Finschia/finschia-sdk/pull/1295) add missing error handling for migration ### Removed diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index 801dfc4901..9164699777 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -116,7 +116,10 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd func (am AppModule) RegisterServices(cfg module.Configurator) { foundation.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServer(am.keeper)) foundation.RegisterQueryServer(cfg.QueryServer(), keeper.NewQueryServer(am.keeper)) - keeper.NewMigrator(am.keeper).Register(cfg.RegisterMigration) + err := keeper.NewMigrator(am.keeper).Register(cfg.RegisterMigration) + if err != nil { + panic(err) + } } // InitGenesis performs genesis initialization for the foundation module. It returns