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

Add promoted operators #203

Merged
merged 5 commits into from
Sep 5, 2024
Merged

Add promoted operators #203

merged 5 commits into from
Sep 5, 2024

Conversation

vincenthongzy
Copy link
Collaborator

@vincenthongzy vincenthongzy commented Aug 30, 2024

Two pages with slightly different information displayed:

  1. /operators
  2. /avs/:address/operators

Some edge cases to consider:

  1. When we search for operators, we should always display the ads even if the result is empty.
  2. In /avs/:address/operators, it is ok to not show promoted operators if they are not currently securing the AVS
  3. If the promoted operators endpoint fails, we don't need to display error.

Backend PR:
https://github.com/NethermindEth/restaking-dashboard-backend/pull/114

@vincenthongzy vincenthongzy requested review from Zishan-7 and rubo and removed request for Zishan-7 August 30, 2024 12:13
Copy link
Collaborator

@Zishan-7 Zishan-7 left a comment

Choose a reason for hiding this comment

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

On /operators page when search result is empty, the promoted operators rows expand to take all of the available space

Also ETH -> USD conversion shows NaN when search result is empty. This happens on the AVS details page as well

Screenshot 2024-09-03 at 12 34 39 PM

@vincenthongzy
Copy link
Collaborator Author

vincenthongzy commented Sep 3, 2024

On /operators page when search result is empty, the promoted operators rows expand to take all of the available space

Also ETH -> USD conversion shows NaN when search result is empty. This happens on the AVS details page as well

Screenshot 2024-09-03 at 12 34 39 PM

Hm strange, the expanding rows on empty results should have been fixed already, I'll take a close look thanks!

@vincenthongzy
Copy link
Collaborator Author

On /operators page when search result is empty, the promoted operators rows expand to take all of the available space

Also ETH -> USD conversion shows NaN when search result is empty. This happens on the AVS details page as well

Screenshot 2024-09-03 at 12 34 39 PM

Fixed by decoupling the promoted operators' rate and normal operators' rate on both BE and FE

promotedOperatorsRate: response.rate
});
} catch (e) {
//TODO: handle error
Copy link
Contributor

Choose a reason for hiding this comment

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

Why no error handling?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the promoted operators endpoint fails, we don't need to display error, so we just swallow it up

Copy link
Contributor

Choose a reason for hiding this comment

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

That TODO confused me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll reword this comment

@vincenthongzy vincenthongzy merged commit 1cf3f74 into main Sep 5, 2024
2 checks passed
@vincenthongzy vincenthongzy deleted the feature/promoted-operators branch September 5, 2024 04:18
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.

3 participants