Skip to content

Commit dcffd96

Browse files
committed
Fix uninitialized map in GetMints
1 parent 582ac1e commit dcffd96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/code/server/currency/currency.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ func (s *currencyServer) GetMints(ctx context.Context, req *currencypb.GetMintsR
6868
log := s.log.WithField("method", "GetMints")
6969
log = client.InjectLoggingMetadata(ctx, log)
7070

71-
resp := &currencypb.GetMintsResponse{}
71+
resp := &currencypb.GetMintsResponse{
72+
MetadataByAddress: make(map[string]*currencypb.Mint),
73+
}
7274

7375
for _, protoMintAddress := range req.Addresses {
7476
mintAccount, err := common.NewAccountFromProto(protoMintAddress)

0 commit comments

Comments
 (0)