Filter accelerations for matching pool

This commit is contained in:
Mononaut 2024-04-09 00:05:46 +00:00
parent b74b8a8a5a
commit 43845cda5c
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -358,11 +358,15 @@ export class BlockComponent implements OnInit, OnDestroy {
const acceleratedInBlock = {};
for (const acc of accelerations) {
acceleratedInBlock[acc.txid] = acc;
if (acc.pools?.some(pool => pool === this.block?.extras?.pool.id || pool?.['pool_unique_id'] === this.block?.extras?.pool.id)) {
acceleratedInBlock[acc.txid] = acc;
}
}
for (const tx of transactions) {
if (acceleratedInBlock[tx.txid]) {
tx.acc = true;
} else {
tx.acc = false;
}
}