') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Make asset detail page more generic by faridsalau · Pull Request #12561 · AudiusProject/apps · GitHub
Skip to content

Make asset detail page more generic - #12561

Merged
faridsalau merged 2 commits into
mainfrom
fs-generic-adp
Jul 21, 2025
Merged

Make asset detail page more generic#12561
faridsalau merged 2 commits into
mainfrom
fs-generic-adp

Conversation

@faridsalau

Copy link
Copy Markdown
Contributor

Description

Allows for navigation to non-AUDIO asset detail pages

How Has This Been Tested?

npm run web:prod

  • Turn on artist_coin feature flag
  • Navigate to /wallet/bonk

@changeset-bot

changeset-botBot commented Jul 18, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fac1d39

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cursorcursorBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Type Assertion Causes Token Lookup Errors

The code uses an unsafe type assertion (symbol as MintName) when determining the tokenMint for useTokenBalance and useFormattedTokenBalance hooks. This bypasses type checking, assuming any symbol (other than 'AUDIO') is a valid MintName. Symbols and mint names can differ (e.g., 'AUDIO' maps to 'wAUDIO'), so if a symbol like 'BONK' is not a valid MintName, it will cause runtime errors. Furthermore, the symbol === 'AUDIO' comparison may fail if the actual symbol for AUDIO is not exactly 'AUDIO' (e.g., 'WAUDIO'), leading to the incorrect raw symbol being used instead of 'wAUDIO' for the token balance lookup.

packages/web/src/pages/asset-detail-page/components/BalanceSection.tsx#L123-L124

https://github.com/AudiusProject/audius-protocol/blob/fac1d39aab11e544735ce0e11324987f345041b2/packages/web/src/pages/asset-detail-page/components/BalanceSection.tsx#L123-L124

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@dylanjeffersdylanjeffers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good looks

@faridsalau
faridsalau merged commit 5e4311d into mainJul 21, 2025
9 of 11 checks passed
@faridsalau
faridsalau deleted the fs-generic-adp branch July 21, 2025 18:26
audius-infra pushed a commit that referenced this pull request Jul 26, 2025
[181df25] Fix search autocomplete (#12584) Ray Jacobson
[70c7782] [PE-6542] Replace msw with CoinsApi (#12589) Dylan Jeffers
[c489cc6] Update rate limit mechanism in solana relay (#12582) Ray Jacobson
[192fb07] Update commentId types and fix mobile notification linking (#12588) Dylan Jeffers
[c9b32a9] QA-2243 fix deep links (#12583) Dylan Jeffers
[2675e3f] [PAY-3974] Add NOT /check to ASA (#12585) Ray Jacobson
[0d7bf55] [QA-2240] Fix track search bottom padding (#12578) Dylan Jeffers
[a4d5e53] [QA-2239] Fix unable to start new chat (#12577) Dylan Jeffers
[fda0576] [QA-2237] Fix collection image regression (#12575) Dylan Jeffers
[6967039] [PE-6553] Add underground trending to explore page (#12573) Randy Schott
[c35c9d1] [QA-2238] Fix unresponsive mobile tiles (#12576) Dylan Jeffers
[d219a23] Update og image urls in web app and ssr (#12574) Dylan Jeffers
[901123e] [PE-6563] Mobile web comment highlighting (#12572) Dylan Jeffers
[3610e8f] [PE-6557] Adds most shared section to Search/Explore (#12570) Randy Schott
[ba739f6] Temp fix missing comment_id in notification endpoint (#12571) Dylan Jeffers
[e7a36fe] Fix playback issue clicking multiple tracks in lineup (#12568) Dylan Jeffers
[53dd38a] Set ruby bundler version (#12569) Dylan Jeffers
[5e4311d] Make asset detail page more generic (#12561) Farid Salau
[a2ffd08] Restore gesture handler (#12564) JD Francis
[0900d9d] Fix mobile lint (#12567) Dylan Jeffers
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@faridsalau@dylanjeffers