This commit is contained in:
SuriyaR 2019-08-08 14:45:57 +05:30
commit e7962f753a
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;