Skip to content

Commit

Permalink
fix: use direct unmarshal for cert iteration
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Jul 29, 2024
1 parent dcc6f7a commit 7a20c53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x/cert/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ func (k keeper) WithCertificates1(ctx sdk.Context, fn func(id types.CertID, cert
for ; iter.Valid(); iter.Next() {
id := parseCertID(iter.Key())

item := k.mustUnmarshal(iter.Key(), iter.Value())
item := types.CertificateResponse{
Serial: id.Serial.String(),
}

k.cdc.MustUnmarshal(iter.Value(), &item.Certificate)

if stop := fn(id, item); stop {
break
}
Expand Down

0 comments on commit 7a20c53

Please sign in to comment.