feat: improve reward history, balance display, connect button, and header (#261-#264) - #405
Merged
DeFiVC merged 1 commit intoSep 1, 2026
Conversation
ChainLearnOfficial#261, ChainLearnOfficial#262) - balance-display: real USD price via new useTokenPrice hook (Stellar Index public API with env fallback), correct USD conversion from the human-readable token amount (was multiplying raw balance), show token decimals and issuer, copy asset address, add refresh action - reward-history: add test coverage for summary stats (total earned, confirmed, pending, failed) - add NEXT_PUBLIC_FALLBACK_TOKEN_USD to env example
❌ Deploy Preview for chainlearn failed.
|
|
@Lekan101 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the four Stellar-wave wallet/reward components to satisfy the acceptance criteria in issues #261–#264.
#261 —
reward-history.tsxThe component already ships combinable filters (status, course search, date range), CSV export, and summary stats. This PR adds test coverage for the summary stats (total earned, confirmed, pending, failed) to lock in the behavior.
#262 —
balance-display.tsx(main change)useTokenPricehook fetches a live USD quote for the token via the public Stellar Index pricing API, with anNEXT_PUBLIC_FALLBACK_TOKEN_USDenv fallback and graceful loading/error states.#263 —
connect-button.tsxVerified complete: connected wallet name (Freighter), network indicator, truncated copyable address, and dropdown with copy address / switch network / disconnect all present.
#264 —
header.tsxVerified complete: authenticated user menu (avatar/initials, profile, settings, logout), notification bell with unread count, and sticky header all present.
Acceptance criteria coverage
reward-history.tsximprovements #261: filters narrow list ✅, export downloads CSV ✅, summary shows totals ✅, filters combinable ✅balance-display.tsximprovements #262: USD equivalent displayed ✅, transaction link navigates to history ✅, contract address copyable ✅, loading state during price fetch ✅connect-button.tsximprovements #263: wallet name shown ✅, network indicator visible ✅, address truncated and copyable ✅, dropdown has wallet actions ✅header.tsximprovements with user menu #264: user menu on auth ✅, profile/settings/logout ✅, notification bell unread count ✅, header sticky ✅Verification
eslint(next lint): no warnings/errors on changed filestsc --noEmit: no new errors (pre-existing unrelated errors remain on main)vitest: new balance-display (5) and reward-history (4) tests passCloses #261
Closes #262
Closes #263
Closes #264