Duplicate issue fixed

This commit is contained in:
root 2019-08-08 13:27:44 +05:30
parent 357f974c57
commit bbb4d407aa
2 changed files with 8 additions and 3 deletions

View File

@ -31,7 +31,7 @@ export class BlockDetailListComponent implements OnInit {
ngOnInit() {
this.gettinglatesthashList();
this.getBlockDetails();
console.log("Enter Nginit");
//console.log("Enter Nginit");
}

View File

@ -48,6 +48,11 @@ export class LatestblocksComponent implements OnInit {
if (res['status'] == 200) {
this.pagedata = res.response;
this.hashvalues = res.response.BlockchainBlockResult;
if(CurrentPage == 1){
this.lastblock = res.response.BlockchainBlockResult[0].blockchain_block_height;
console.log(this.lastblock);
}
}
},
error => {},
@ -57,9 +62,9 @@ export class LatestblocksComponent implements OnInit {
getLastCeatedBlock() {
this.chartService.getLatestblockdetails().subscribe(response => {
this.blockdetails = response;
console.log(this.blockdetails);
//console.log(this.blockdetails);
if (this.lastblock != this.blockdetails.block_height) {
console.log('Create');
//console.log('Create');
this.createBlock();
}
this.lastblock = this.blockdetails.block_height;