updated
This commit is contained in:
parent
6a3336f6be
commit
3f756a864b
@ -77,17 +77,17 @@ export class LatestblocksComponent implements OnInit {
|
|||||||
|
|
||||||
// console.log("Enter If");
|
// console.log("Enter If");
|
||||||
|
|
||||||
|
var socket_array = this.blockdetails.BlockchainBlockResult;
|
||||||
var ids = new Set(this.blockdetails.BlockchainBlockResult.map(d => d.blockchain_block_height));
|
var ids = new Set(socket_array.map(d => d.blockchain_block_height));
|
||||||
this.Merged_data = [...this.blockdetails.BlockchainBlockResult, ...this.FirstPageListData.filter(d => !ids.has(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 onlyInA = this.FirstPageListData.filter(this.comparer(this.Merged_data));
|
||||||
var onlyInB = this.Merged_data.filter(this.comparer(this.FirstPageListData));
|
var onlyInB = this.Merged_data.filter(this.comparer(this.FirstPageListData));
|
||||||
|
|
||||||
this.DifferentList = onlyInA.concat(onlyInB);
|
this.DifferentList = onlyInA.concat(onlyInB);
|
||||||
|
|
||||||
console.log("socket result", this.Merged_data);
|
//console.log("socket result", this.Merged_data);
|
||||||
console.log("First page result",this.FirstPageListData);
|
//console.log("First page result",this.FirstPageListData);
|
||||||
this.DifferentList.sort((a, b) => (a.blockchain_block_height) - (b.blockchain_block_height));
|
this.DifferentList.sort((a, b) => (a.blockchain_block_height) - (b.blockchain_block_height));
|
||||||
|
|
||||||
this.DifferentList.forEach(DifferentList => {
|
this.DifferentList.forEach(DifferentList => {
|
||||||
@ -95,7 +95,7 @@ export class LatestblocksComponent implements OnInit {
|
|||||||
//this.createBlock(DifferentList)
|
//this.createBlock(DifferentList)
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("DifferentList",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);
|
||||||
|
Loading…
Reference in New Issue
Block a user