routerrpc: default timeout_seconds to 60 in SendPaymentV2

If timeout_seconds is not set or is 0, the default value
of 60 seconds will be used.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
This commit is contained in:
Nishant Bansal committed 2025-01-15 19:45:44 +05:30
1 parent 4b16c2902e
commit b577ad4661
5 files changed
+20 -14

No files matched your search

-5
View File
@@ -878,11 +878,6 @@ func (r *RouterBackend) extractIntentFromSendRequest(
return nil, err
}
// Set payment attempt timeout.
if rpcPayReq.TimeoutSeconds == 0 {
return nil, errors.New("timeout_seconds must be specified")
}
customRecords := record.CustomSet(rpcPayReq.DestCustomRecords)
if err := customRecords.Validate(); err != nil {
return nil, err