From 3f756a864bee613d3e93c1e80d01087455c3582c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Aug 2019 12:02:21 +0530 Subject: [PATCH] updated --- .../view/home/latestblocks/latestblocks.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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);