diff --git a/x/genutil/gentx.go b/x/genutil/gentx.go index f7e4250def1d..19d7f33efe1b 100644 --- a/x/genutil/gentx.go +++ b/x/genutil/gentx.go @@ -42,7 +42,6 @@ func ValidateAccountInGenesis( ) error { var stakingData stakingtypes.GenesisState cdc.MustUnmarshalJSON(appGenesisState[stakingtypes.ModuleName], &stakingData) - bondDenom := stakingData.Params.BondDenom var err error @@ -56,10 +55,9 @@ func ValidateAccountInGenesis( // ensure that account is in genesis if accAddress.Equals(addr) { // ensure account contains enough funds of default bond denom - if coins.AmountOf(bondDenom).GT(accCoins.AmountOf(bondDenom)) { + if coins.IsAnyGT(accCoins) { err = fmt.Errorf( - "account %s has a balance in genesis, but it only has %v%s available to stake, not %v%s", - addr, accCoins.AmountOf(bondDenom), bondDenom, coins.AmountOf(bondDenom), bondDenom, + "account %s has a balance in genesis, but it does not have enough to stake", addr, ) return true