fix(x/staking): avoid overriding error (#23076)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Marko 2025-01-06 10:54:19 +01:00 committed by GitHub
parent c9ca206e13
commit 65971ffb40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -858,9 +858,9 @@ func (k Keeper) getBeginInfo(
return completionTime, height, false, nil
}
headerInfo := k.HeaderService.HeaderInfo(ctx)
unbondingTime, err := k.UnbondingTime(ctx)
if err != nil {
return completionTime, height, false, err
unbondingTime, err2 := k.UnbondingTime(ctx)
if err2 != nil {
return completionTime, height, false, errors.Join(err, err2)
}
// TODO: When would the validator not be found?