Skip to content

Fix oauth/pay logged out state and no-balance copy#14042

Merged
raymondjacobson merged 4 commits intomainfrom
fix/oauth-pay-logged-out-state
Apr 3, 2026
Merged

Fix oauth/pay logged out state and no-balance copy#14042
raymondjacobson merged 4 commits intomainfrom
fix/oauth-pay-logged-out-state

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

@raymondjacobson raymondjacobson commented Apr 2, 2026

Summary

  • Redirect logged-out users on /oauth/pay to the sign-up flow via useRequiresAccount, preserving all query params so they return to the pay page after account creation
  • Update "does not hold coin" and "insufficient balance" error messages to include a link to audius.co/wallet (opens in new tab) so users can add funds
  • Remove dead logged-out placeholder text that is no longer reachable
image

Test plan

  • Visit /oauth/pay?mint=...&handle=...&amount=...&redirect_uri=postMessage&origin=... while logged out — should redirect to sign-up
  • After signing up, confirm you're redirected back to the pay page with params intact
  • While logged in with no balance of the coin, verify "Add funds on your wallet" message with working link to /wallet
  • While logged in with insufficient balance, verify same wallet link appears
  • Confirm wallet link opens in a new tab

🤖 Generated with Claude Code

Redirect logged-out users to sign up via useRequiresAccount hook
(preserving query params for return), and update no-balance/no-coin
error messages to link users to audius.co/wallet in a new tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

⚠️ No Changeset found

Latest commit: ce7d1a9

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14042.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

raymondjacobson and others added 2 commits April 2, 2026 15:15
Unify both error cases into a single "Not enough balance, add funds on
your wallet." message with an underlined link. Shown proactively before
the user clicks confirm (confirm button is already disabled).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The balance (e.g. 18 decimals for AUDIO) and URL amount (e.g. 8 decimals
from tokenInfo) used different decimal scales, causing the raw bigint
comparison to always pass. Normalize both to the same scale via
FixedDecimal before comparing so the insufficient balance message and
disabled confirm button appear correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@dylanjeffers dylanjeffers left a comment

Choose a reason for hiding this comment

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

Great work

@raymondjacobson raymondjacobson merged commit 20652e2 into main Apr 3, 2026
14 checks passed
@raymondjacobson raymondjacobson deleted the fix/oauth-pay-logged-out-state branch April 3, 2026 05:36
Sign up for free to 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