node/pkg/publicrpc: handle nil req.MessageID

Change-Id: Id43ef898a687bb5ad4b2a80ed42b08aca538ea26
This commit is contained in:
Leo 2021-09-17 20:29:40 +02:00
parent df3418bafb
commit 305fcdc393
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@ func (s *PublicrpcServer) GetSignedVAA(ctx context.Context, req *publicrpcv1.Get
if len(address) != 32 {
return nil, status.Error(codes.InvalidArgument, "address must be 32 bytes")
}
if req.MessageId == nil {
return nil, status.Error(codes.InvalidArgument, "no message ID specified")
}
addr := vaa.Address{}
copy(addr[:], address)