mirror of
https://github.com/mempool/mempool.git
synced 2025-09-26 05:26:58 +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,
|
||||
total: parseInt(response.headers.get('X-Total-Count'), 10) || 0,
|
||||
accelerations: accelerations.concat(response.body || []),
|
||||
pageAccelerations: response.body || [],
|
||||
})),
|
||||
switchMap(({page, total, accelerations}) => {
|
||||
if (accelerations.length >= Math.min(total, limit ?? Infinity) || (findTxid && accelerations.find((acc) => acc.txid === findTxid))) {
|
||||
switchMap(({page, total, accelerations, pageAccelerations }) => {
|
||||
if (pageAccelerations.length === 0 || accelerations.length >= Math.min(total, limit ?? Infinity) || (findTxid && accelerations.find((acc) => acc.txid === findTxid))) {
|
||||
return of({ page, total, accelerations });
|
||||
} else {
|
||||
return getPage$(page + 1, accelerations);
|
||||
|
Reference in New Issue
Block a user