add paginated virtual scrolling to blockchain blocks bar

This commit is contained in:
Mononaut
2022-12-27 05:28:57 -06:00
parent 5905eebaa6
commit befafaa60c
11 changed files with 355 additions and 80 deletions

View File

@@ -70,7 +70,7 @@ export class WebsocketService {
clearTimeout(this.onlineCheckTimeout);
clearTimeout(this.onlineCheckTimeoutTwo);
this.stateService.latestBlockHeight = -1;
this.stateService.resetChainTip();
this.websocketSubject.complete();
this.subscription.unsubscribe();
@@ -226,7 +226,7 @@ export class WebsocketService {
const blocks = response.blocks;
blocks.forEach((block: BlockExtended) => {
if (block.height > this.stateService.latestBlockHeight) {
this.stateService.latestBlockHeight = block.height;
this.stateService.updateChainTip(block.height);
this.stateService.blocks$.next([block, false]);
}
});
@@ -238,7 +238,7 @@ export class WebsocketService {
if (response.block) {
if (response.block.height > this.stateService.latestBlockHeight) {
this.stateService.latestBlockHeight = response.block.height;
this.stateService.updateChainTip(response.block.height);
this.stateService.blocks$.next([response.block, !!response.txConfirmed]);
}