From 90aaedee31fbe4adb771fcea1d85950ae5d9500c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Kunze=20K=C3=BCllmer?= Date: Tue, 19 Apr 2022 11:37:09 +0200 Subject: [PATCH] use cdc for marshaling --- app/utils.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/utils.go b/app/utils.go index a2f2024fc5..d8170ac578 100644 --- a/app/utils.go +++ b/app/utils.go @@ -139,10 +139,7 @@ func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simty } stakingState := new(stakingtypes.GenesisState) - err = cdc.UnmarshalJSON(stakingStateBz, stakingState) - if err != nil { - panic(err) - } + cdc.MustUnmarshalJSON(stakingStateBz, stakingState) // we should get the BondDenom and make it the evmdenom. // thus simulation accounts could have positive amount of gas token. @@ -154,10 +151,7 @@ func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simty } evmState := new(evmtypes.GenesisState) - err = cdc.UnmarshalJSON(evmStateBz, evmState) - if err != nil { - panic(err) - } + cdc.MustUnmarshalJSON(evmStateBz, evmState) // we should replace the EvmDenom with BondDenom evmState.Params.EvmDenom = bondDenom