Merge pull request #1808 from mempool/nymkappa/bugfix/fix-blocks-list-loading

Make sure blocks list rxjs observable triggers at least once
This commit is contained in:
wiz 2022-06-06 03:43:59 +09:00 committed by GitHub
commit 262c3af33e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,7 @@ export class BlocksList implements OnInit {
this.stateService.blocks$ this.stateService.blocks$
.pipe( .pipe(
switchMap((block) => { switchMap((block) => {
if (block[0].height <= this.lastBlockHeight) { if (block[0].height < this.lastBlockHeight) {
return []; // Return an empty stream so the last pipe is not executed return []; // Return an empty stream so the last pipe is not executed
} }
this.lastBlockHeight = block[0].height; this.lastBlockHeight = block[0].height;