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

feat(suite): add support for Solana staking rewards #16527

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

dev-pvl
Copy link
Contributor

@dev-pvl dev-pvl commented Jan 22, 2025

Description

This PR adds rewards to the Solana staking dashboard. Key changes:

  • Fetching and displaying Solana staking rewards.
  • UI components to show detailed reward information.
  • Pagination support for navigating through rewards.
  • Added empty state and the refetch logic for the rewards list

Related Issue

Resolve #16597

Screenshots:

image
image
image

@dev-pvl dev-pvl force-pushed the feat/solana-rewards-list branch 3 times, most recently from d57a76b to f700b29 Compare January 24, 2025 08:04
@@ -12,3 +12,6 @@ export const EVERSTAKE_ENDPOINT_PREFIX: Record<
sol: 'https://dashboard-api.everstake.one',
dsol: 'https://dashboard-api.everstake.one',
};

export const EVERSTAKE_REWARDS_SOLANA_ENPOINT =
Copy link
Member

@tomasklim tomasklim Jan 24, 2025

Choose a reason for hiding this comment

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

add to allowedDomains config.ts in suite-desktop-core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, forgot about it. Added 9c30965

const isSolanaMainnet = account.symbol === 'sol';

const fetchRewards = useCallback(
async ({ symbol, descriptor }: Account) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: what do you think about moving whole logic with fetching and paging into a hook (useSolanaRewards ?) to make this component simpler? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, it looks better now 9c30965

@dev-pvl dev-pvl force-pushed the feat/solana-rewards-list branch from f700b29 to 00e51b6 Compare January 27, 2025 12:07
@dev-pvl dev-pvl force-pushed the feat/solana-rewards-list branch from 9c30965 to 9fca587 Compare January 29, 2025 10:08
@dev-pvl dev-pvl marked this pull request as ready for review January 29, 2025 10:21
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.

Solana rewards tx history
3 participants