Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix application status error on stake details page #672

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

michalsmiarowski
Copy link
Contributor

@michalsmiarowski michalsmiarowski commented Nov 30, 2023

There was a bug that caused inaccuracies in the statuses of the tbtc and random beacon apps on the stake detail page. When you refresh the details page for a stake that the apps were not authorized for, it incorrectly displays them as authorized:
image

This issue resolves itself when you navigate to the authorization or staking page and then return to the details page:
image

The issue arises from the fact that we did not dispatch the getSupportedApps action on the detail page. Consequently, the getSupportedAppsEffect was not triggered, leading to the minimumAuthorization value being set to 0 in the selectStakingAppByStakingProvider selector. This results in the isAuthorized flag being set to true:

const minAuth = appState.parameters.data.minimumAuthorization
const isAuthorized = BigNumber.from(authData?.authorizedStake || "0").gte(
BigNumber.from(minAuth || 0)
)

There was a bug that caused inaccuracies in the statuses of the tbtc and random
beacon apps on the stake detail page. When you refresh the details page for a
stake that the apps were not authorized for, it incorrectly displays them as
authorized. This issue resolves itself when you navigate to the authorization or
staking page and then return to the details page.

The issue arises from the fact that we did not dispatch the `getSupportedApps`
action on the detail page. Consequently, the `getSupportedAppsEffect` was not
triggered, leading to the `minimumAuthorization` value being set to 0 in the
`selectStakingAppByStakingProvider` selector. This results in the `isAuthorized`
flag being set to false.
@michalsmiarowski michalsmiarowski added this to the v1.14.0 milestone Nov 30, 2023
Copy link

Copy link
Member

@theref theref left a comment

Choose a reason for hiding this comment

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

Such an easy fix, love it

@theref theref merged commit 6601946 into main Nov 30, 2023
5 checks passed
@theref theref deleted the stake-details-authorization-status-fix branch November 30, 2023 16:19
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