The Daily Adventures of a SteemPeak Developer #8 - Show Scotbot Delay in the Tribes Page

in #dailyadventures2 years ago (edited)

A while back I've seen this post by @holger80 and soon I created a ticket for SteemPeak as a reminder to add these details to the Tribes page. I've been busy with other features but finally got to this ticket and included this feature in the next update.

The main reason to show this information is to inform users when Scotbot is a bit behind on blocks and rewards displayed may be not aligned yet.

Show the Scotbot delay in the Tribes page


Read other posts in the series HERE

As explained in the post I linked above the main API endpoint to retrieve the current state of the sidechain is The response is the following:


So I added a call to this API when the Tribes page is loaded and a check on the time_delay_seconds field to show a warning when the delay is greater than 5 minutes.

const scotNode = '';


computed: {
  showWarning () {
    return this.scotDelayMinutes > 5;


mounted () {
  axios.get(`${scotNode}/state`).then(response => {
    this.scotDelayMinutes = parseInt( / 60);
    this.scotStateDetails =;
  }).catch(error => {
    console.error('Error retrieving SCOT state: ', error)


When showWarning is equals to true a small label is shown with more details available in a tooltip (for this example I modified the code to always show the warning, despite the 5 minutes threshold):


I hope you will like this small addition but I'll be happy if you never see it as it means that Scotbot is doing great :D ...and of course a thank you to @holger80 for all his great work.

As always feedback and suggestion are much appreciated, both in the comments or on our Discord ;)



It's the little things like this that make you amazing at what you do. From everyone at SteemPeak and using SteemPeak... thank you.