mirror of
https://github.com/mempool/mempool.git
synced 2025-09-27 13:56:23 +02:00
Merge pull request #5907 from mempool/mononaut/acceleration-history-sanity-check
This commit is contained in:
@@ -169,9 +169,10 @@ export class ServicesApiServices {
|
|||||||
page,
|
page,
|
||||||
total: parseInt(response.headers.get('X-Total-Count'), 10) || 0,
|
total: parseInt(response.headers.get('X-Total-Count'), 10) || 0,
|
||||||
accelerations: accelerations.concat(response.body || []),
|
accelerations: accelerations.concat(response.body || []),
|
||||||
|
pageAccelerations: response.body || [],
|
||||||
})),
|
})),
|
||||||
switchMap(({page, total, accelerations}) => {
|
switchMap(({page, total, accelerations, pageAccelerations }) => {
|
||||||
if (accelerations.length >= Math.min(total, limit ?? Infinity) || (findTxid && accelerations.find((acc) => acc.txid === findTxid))) {
|
if (pageAccelerations.length === 0 || accelerations.length >= Math.min(total, limit ?? Infinity) || (findTxid && accelerations.find((acc) => acc.txid === findTxid))) {
|
||||||
return of({ page, total, accelerations });
|
return of({ page, total, accelerations });
|
||||||
} else {
|
} else {
|
||||||
return getPage$(page + 1, accelerations);
|
return getPage$(page + 1, accelerations);
|
||||||
|
Reference in New Issue
Block a user