Skip to content

Adding 24 second auto-refresh for validators#176

Open
valefar-on-discord wants to merge 2 commits into
mainfrom
refetch-validators
Open

Adding 24 second auto-refresh for validators#176
valefar-on-discord wants to merge 2 commits into
mainfrom
refetch-validators

Conversation

@valefar-on-discord
Copy link
Copy Markdown
Collaborator

Adding a 24 second poll to auto-refresh the validators to keep the state up to date without needed to refresh.
This created some issues when in the process of submitting transactions but that was resolve by locking the entries upon opening the drawer.

setTransactions([]);
}
}, [consolidateEntries]);
}, [open]);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you not need consolidateEntries anymore?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consolidateEntries is the object created in the parent provided but that changes as the underlying validator list changes, which would happen on refresh. But, when the modal is open, the entries should no longer change and be more or less locked, so we will take the consolidateEntries when the modal is open and show those values to the user.

This prevents a previously reported issue where the progress modal looks to restart when the validators refresh.

Copy link
Copy Markdown
Collaborator

@bee16zee bee16zee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a quick question but looks good otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants