This commit is contained in:
root 2019-08-29 11:03:23 +05:30
parent a01b2ca069
commit fd1ea2d63a

View File

@ -75,18 +75,19 @@ export class LatestblocksComponent implements OnInit {
if (this.CurrentpageNumber == 1) { if (this.CurrentpageNumber == 1) {
// console.log("Enter If"); // console.log("Enter If");
// console.log(this.blockdetails); console.log("socket result", this.blockdetails.BlockchainBlockResult);
console.log(this.FirstPageListData); console.log("First page result",this.FirstPageListData);
var onlyInA = this.FirstPageListData.filter(this.comparer(this.blockdetails.BlockchainBlockResult)); var onlyInA = this.FirstPageListData.filter(this.comparer(this.blockdetails.BlockchainBlockResult));
var onlyInB = this.blockdetails.BlockchainBlockResult.filter(this.comparer(this.FirstPageListData)); var onlyInB = this.blockdetails.BlockchainBlockResult.filter(this.comparer(this.FirstPageListData));
this.DifferentList = onlyInA.concat(onlyInB); this.DifferentList = onlyInA.concat(onlyInB);
this.DifferentList.forEach(DifferentList => { this.DifferentList.forEach(DifferentList => {
this.createBlock(DifferentList) this.FirstPageListData.unshift(DifferentList);
//this.createBlock(DifferentList)
}); });
console.log(this.DifferentList); console.log("DifferentList",this.DifferentList);
} }
this.lastblock = this.blockdetails.block_height; this.lastblock = this.blockdetails.block_height;
//console.log(this.lastblock); //console.log(this.lastblock);
@ -102,7 +103,6 @@ export class LatestblocksComponent implements OnInit {
} }
public createBlock(DifferentList) { public createBlock(DifferentList) {
this.FirstPageListData.unshift(DifferentList);
const blockFactory = this.resolver.resolveComponentFactory( const blockFactory = this.resolver.resolveComponentFactory(
BlockAppendComponent, BlockAppendComponent,
); );