routerrpc: add nil check for MilliSat
This commit is contained in:
1 file changed
+1
-1
@@ -519,7 +519,7 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if *payReq.MilliSat <= 0 {
|
if payReq.MilliSat == nil || *payReq.MilliSat <= 0 {
|
||||||
return nil, errors.New("payment request amount must be " +
|
return nil, errors.New("payment request amount must be " +
|
||||||
"greater than 0")
|
"greater than 0")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user