multi: fix timestamp filters for payment query

This commit fixes the timestamp precision to always compare the dates
using unix seconds for payments.
This commit is contained in:
yyforyongyu committed 2024-02-05 15:26:49 +08:00
1 parent 18333e8c7d
commit 605211823d
3 files changed
+21 -37

No files matched your search

+2 -14
View File
@@ -6637,20 +6637,8 @@ func (r *rpcServer) ListPayments(ctx context.Context,
Reversed: req.Reversed,
IncludeIncomplete: req.IncludeIncomplete,
CountTotal: req.CountTotalPayments,
}
// Attach the start date if set.
if req.CreationDateStart != 0 {
query.CreationDateStart = time.Unix(
int64(req.CreationDateStart), 0,
)
}
// Attach the end date if set.
if req.CreationDateEnd != 0 {
query.CreationDateEnd = time.Unix(
int64(req.CreationDateEnd), 0,
)
CreationDateStart: int64(req.CreationDateStart),
CreationDateEnd: int64(req.CreationDateEnd),
}
// If the maximum number of payments wasn't specified, then we'll