Skip to content

Commit

Permalink
Set last block height retrieval to index 7 instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarStoic committed Sep 4, 2024
1 parent ea425f6 commit 8cab27b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mempoolWebSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function connectToMempoolAPI() {

// Extract the last block height from the 'blocks' object
if (data.blocks && data.blocks.length > 0) {
const lastBlockHeight = data.blocks[0].height;
const lastBlockHeight = data.blocks[7].height;
document.getElementById('block-height').textContent = '' + lastBlockHeight;
} else {
console.log('Block height data not available in the received payload.');
Expand Down

0 comments on commit 8cab27b

Please sign in to comment.