Repository navigation
Add goal templates, deposit QR, leaderboard and streaks - #471
Merged
nayt9 merged 2 commits intoOct 18, 2026
Merged
Conversation
|
@fati-Onchain 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! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
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.
Closes #356, closes #357, closes #358, closes #359
All four features are frontend-only and follow the existing component and hook patterns (Tailwind tokens,
apiFetchhooks with a fetch-on-mount/refetch shape, dialogs with an Escape key handler and focus trap). New components are exported fromcomponents/savings/index.ts.#356 Savings goal templates
lib/goalTemplates.ts: six pre-built templates (emergency fund, vacation, new laptop, education, car, home deposit). Each has a recommended target in XLM and a suggested timeline in months. A helper works out the monthly contribution.GoalTemplatePicker: a grid of template cards shown at the top ofGoalForm. Picking one fills in the goal name and target amount, and both stay editable before the goal is created. While a template is selected, the form shows the monthly amount needed to reach the current target in the template's timeline.GoalFormalso accepts an optionalinitialTemplateIdprop, so a template can be pre-selected.#357 QR code generator for deposit addresses
DepositQrModal: a modal that shows a QR code for the user's deposit address. It is opened from a new Deposit QR quick action on the dashboard.lib/depositQr.ts):G…account, which any wallet understands.web+stellar:payURI with the destination plus optional asset and amount.qrcodedependency.execCommandfallback was moved fromAddressBadgeintolib/clipboard.tsso both components share it.AddressBadgebehaves the same as before.NEXT_PUBLIC_USDC_ISSUERis set, because a SEP-7 request for a non-native asset needs its issuer.#358 Group savings leaderboard
GroupLeaderboard: ranks a pool's members by how much they have contributed. The top three get medals and the viewer's own row is marked "You". Amounts are compared asBigIntstroops so no precision is lost.localStorage.useGroupDetailtakes a new optionalpollIntervalMsoption. It refreshes the group in the background without switching the page back to its loading state, and it keeps the last good data if a refresh fails. The hook now also returnsupdatedAt. The group detail page polls every 15s and shows a "Live · updated hh:mm:ss" indicator.#359 Savings streak tracker
lib/streaks.ts: counts the current and longest streak of consecutive deposit days or Monday-based weeks, using the viewer's local calendar and a day count that DST changes can't throw off. A streak stays active until a whole day or week passes with no deposit.SavingsStreakTracker: a flame counter showing the current and longest streak, a Daily/Weekly toggle, a short prompt (for example "Deposit today to keep your streak alive"), and a grid showing which badges are earned and which are still locked.useDepositHistoryfetchesGET /api/savings/deposits?address=and accepts either{ deposits: [{ created_at }] }or a bare array. A 404 is treated as "no deposits yet". The tracker appears on the dashboard and is hidden if the history request fails.Builds, tests and lint were not run for this change.
Closes #356
Closes #357
Closes #358
Closes #359