From bee77a88ccad4a38ef55ea2be4df4868b832f746 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Tue, 8 Oct 2024 16:35:16 +0800 Subject: [PATCH] lint --- x/auth/helpers/genaccounts.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x/auth/helpers/genaccounts.go b/x/auth/helpers/genaccounts.go index e3827fa05898..7e60b57098ed 100644 --- a/x/auth/helpers/genaccounts.go +++ b/x/auth/helpers/genaccounts.go @@ -198,7 +198,8 @@ func AddGenesisAccounts( baseAccount := authtypes.NewBaseAccount(accAddr, nil, 0, 0) vestingAmt := acc.VestingAmt - if !vestingAmt.IsZero() { + switch { + case !vestingAmt.IsZero(): vestingStart := acc.VestingStart vestingEnd := acc.VestingEnd @@ -218,9 +219,9 @@ func AddGenesisAccounts( default: return errors.New("invalid vesting parameters; must supply start and end time or end time") } - } else if acc.ModuleName != "" { + case acc.ModuleName != "": genAccount = authtypes.NewEmptyModuleAccount(acc.ModuleName, authtypes.Burner, authtypes.Minter) - } else { + default: genAccount = baseAccount }