diff --git a/src/app/view/home/latestblocks/latestblocks.component.ts b/src/app/view/home/latestblocks/latestblocks.component.ts index 0d2f047..b8bcf92 100644 --- a/src/app/view/home/latestblocks/latestblocks.component.ts +++ b/src/app/view/home/latestblocks/latestblocks.component.ts @@ -77,17 +77,17 @@ export class LatestblocksComponent implements OnInit { // console.log("Enter If"); - - var ids = new Set(this.blockdetails.BlockchainBlockResult.map(d => d.blockchain_block_height)); - this.Merged_data = [...this.blockdetails.BlockchainBlockResult, ...this.FirstPageListData.filter(d => !ids.has(d.blockchain_block_height))]; + var socket_array = this.blockdetails.BlockchainBlockResult; + var ids = new Set(socket_array.map(d => d.blockchain_block_height)); + this.Merged_data = [...socket_array, ...this.FirstPageListData.filter(d => !ids.has(d.blockchain_block_height))]; var onlyInA = this.FirstPageListData.filter(this.comparer(this.Merged_data)); var onlyInB = this.Merged_data.filter(this.comparer(this.FirstPageListData)); this.DifferentList = onlyInA.concat(onlyInB); - console.log("socket result", this.Merged_data); - console.log("First page result",this.FirstPageListData); + //console.log("socket result", this.Merged_data); + //console.log("First page result",this.FirstPageListData); this.DifferentList.sort((a, b) => (a.blockchain_block_height) - (b.blockchain_block_height)); this.DifferentList.forEach(DifferentList => { @@ -95,7 +95,7 @@ export class LatestblocksComponent implements OnInit { //this.createBlock(DifferentList) }); - console.log("DifferentList",this.DifferentList); + //console.log("DifferentList",this.DifferentList); } this.lastblock = this.blockdetails.block_height; //console.log(this.lastblock);