fix(x/auth): fix slice init length (#22006)

This commit is contained in:
huochexizhan 2024-10-02 03:05:16 +08:00 committed by GitHub
parent 3a69bb67b1
commit 8833670ec3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,7 @@ func (p Periods) TotalAmount() sdk.Coins {
// String implements the fmt.Stringer interface
func (p Periods) String() string {
periodsListString := make([]string, len(p))
periodsListString := make([]string, 0, len(p))
for _, period := range p {
periodsListString = append(periodsListString, period.String())
}