Add missing null check in block accelerations subscription

This commit is contained in:
Mononaut 2024-03-07 19:52:42 +00:00
parent 7491fb512c
commit e7788133fa
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -481,7 +481,7 @@ export class BlockComponent implements OnInit, OnDestroy {
totalFees += acc.boost_cost;
}
this.oobFees = totalFees;
if (block.height === this.block.height && this.blockAudit) {
if (block && this.block && this.blockAudit && block?.height === this.block?.height) {
this.blockAudit.feeDelta = this.blockAudit.expectedFees > 0 ? (this.blockAudit.expectedFees - (this.block.extras.totalFees + this.oobFees)) / this.blockAudit.expectedFees : 0;
}
},