Fix merge conflicts
This commit is contained in:
parent
886a099a2f
commit
1e69ea2f1d
@ -82,12 +82,12 @@ export class BlocksList implements OnInit {
|
|||||||
),
|
),
|
||||||
this.stateService.blocks$
|
this.stateService.blocks$
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap((block) => {
|
switchMap((blocks) => {
|
||||||
if (block[0].height <= this.lastBlockHeight) {
|
if (blocks[0].height <= this.lastBlockHeight) {
|
||||||
return [null]; // Return an empty stream so the last pipe is not executed
|
return [null]; // Return an empty stream so the last pipe is not executed
|
||||||
}
|
}
|
||||||
this.lastBlockHeight = block[0].height;
|
this.lastBlockHeight = blocks[0].height;
|
||||||
return [block];
|
return blocks;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
|
@ -135,23 +135,16 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
|||||||
tap((blocks) => {
|
tap((blocks) => {
|
||||||
this.latestBlockHeight = blocks[0].height;
|
this.latestBlockHeight = blocks[0].height;
|
||||||
}),
|
}),
|
||||||
scan((acc, [block]) => {
|
switchMap((blocks) => {
|
||||||
if (acc.find((b) => b.height == block.height)) {
|
|
||||||
return acc;
|
|
||||||
}
|
|
||||||
acc.unshift(block);
|
|
||||||
acc = acc.slice(0, 6);
|
|
||||||
|
|
||||||
if (this.stateService.env.MINING_DASHBOARD === true) {
|
if (this.stateService.env.MINING_DASHBOARD === true) {
|
||||||
for (const block of acc) {
|
for (const block of blocks) {
|
||||||
// @ts-ignore: Need to add an extra field for the template
|
// @ts-ignore: Need to add an extra field for the template
|
||||||
block.extras.pool.logo = `/resources/mining-pools/` +
|
block.extras.pool.logo = `/resources/mining-pools/` +
|
||||||
block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
|
block.extras.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return of(blocks.slice(0, 6));
|
||||||
return acc;
|
})
|
||||||
}, []),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.transactions$ = this.stateService.transactions$
|
this.transactions$ = this.stateService.transactions$
|
||||||
|
@ -201,7 +201,7 @@ export class StateService {
|
|||||||
|
|
||||||
this.networkChanged$.subscribe((network) => {
|
this.networkChanged$.subscribe((network) => {
|
||||||
this.transactions$ = new ReplaySubject<TransactionStripped>(6);
|
this.transactions$ = new ReplaySubject<TransactionStripped>(6);
|
||||||
this.blocksSubject$ = new BehaviorSubject<BlockExtended[]>([]);
|
this.blocksSubject$.next([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.blockVSize = this.env.BLOCK_WEIGHT_UNITS / 4;
|
this.blockVSize = this.env.BLOCK_WEIGHT_UNITS / 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user