fix: badge XLM inflation, OG hardcode, embed 404 layout, notif toggle race#732
Merged
OlaGreat merged 1 commit intoJun 29, 2026
Conversation
…tom tokens (OlaGreat#717) Grouping by assetCode alone let any Stellar token that reuses the code 'XLM' (with a non-null issuer) inflate the native XLM total, causing the total_100_xlm badge to be awarded incorrectly. Fix: group by both assetCode and assetIssuer, then filter for native XLM (assetCode === 'XLM' && assetIssuer === null) before summing. Same issuer-blind pattern fixed in OlaGreat#636 for milestone progress. Closes OlaGreat#717
|
@daniella-techie 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
This PR addresses four related quality and correctness issues:
[Backend] badge-awarder XLM total groups by assetCode only — custom XLM token inflates badge count #717 (implemented) —
badge-awarder.tsgrouped byassetCodealone, so any custom Stellar token reusing the codeXLM(with a non-null issuer) inflated the native XLM total and caused incorrecttotal_100_xlmbadge awards. Fixed by grouping by bothassetCodeandassetIssuerand filtering for native XLM withassetIssuer === null. Same issuer-blind pattern fixed in [Backend] Milestone progress ignores assetIssuer — multi-issuer profiles double-count #636 for milestone progress.[Frontend] supporters/[address] page hardcodes novasupport.xyz in Open Graph metadata #714 —
supporters/[address]/page.tsxhardcodeshttps://novasupport.xyzin theog:urlfield. Preview and staging deployments emit a canonical URL pointing to production. Fix: replace with`${SITE_URL}/supporters/${params.address}`using the existingSITE_URLimport from@/lib/config, matching the pattern used on all other pages.[Frontend] Embed page calls notFound() with no embed-specific not-found handler — renders main site layout in iframe #715 —
embed/[username]/page.tsxcallsnotFound()with noapp/embed/[username]/not-found.tsxhandler. Next.js bubbles to the root 404 page which renders the full site layout inside the iframe — broken for the site owner. Fix: add a minimalnot-found.tsxwith a bare HTML shell and a neutral "profile no longer available" message.[Frontend] NotificationPreferences rapid toggle race condition reverts wrong preference #716 —
notification-preferences.tsxPATCH error handler callssetPrefs((prev) => ({ ...prev, [key]: !newValue }))wherenewValueis captured in a stale closure. Rapid toggles of two different preferences can revert to the wrong value. Fix: replace withsetPrefs((prev) => ({ ...prev, [key]: prev[key] }))to always roll back to the last-known good state, or disable all toggles while a PATCH is in-flight.Test plan
total_100_xlmbadge should not be awardedog:urlon a preview deployment of/supporters/[address]— should reflect preview domain, notnovasupport.xyz/embed/[username]for a deleted profile — should show the minimal embed error view, not the full site layoutCloses #717
Closes #714
Closes #715
Closes #716