From 1480f67687a8d31aae71b09d38ec23bf1dadf18f Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Fri, 24 May 2024 10:24:37 +0900 Subject: [PATCH] return error instead of panic in InitGenesis --- x/fbridge/keeper/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/fbridge/keeper/genesis.go b/x/fbridge/keeper/genesis.go index 479abedd8d..65c4db9181 100644 --- a/x/fbridge/keeper/genesis.go +++ b/x/fbridge/keeper/genesis.go @@ -25,7 +25,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, gs *types.GenesisState) error { for _, sw := range gs.BridgeSwitches { if err := k.setBridgeSwitch(ctx, sdk.MustAccAddressFromBech32(sw.Guardian), sw.Status); err != nil { - panic(err) + return err } }