Fix oauth/pay logged out state and no-balance copy#14042
Merged
raymondjacobson merged 4 commits intomainfrom Apr 3, 2026
Merged
Fix oauth/pay logged out state and no-balance copy#14042raymondjacobson merged 4 commits intomainfrom
raymondjacobson merged 4 commits intomainfrom
Conversation
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>
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14042.audius.workers.dev Unique preview for this PR (deployed from this branch). |
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>
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
/oauth/payto the sign-up flow viauseRequiresAccount, preserving all query params so they return to the pay page after account creationTest plan
/oauth/pay?mint=...&handle=...&amount=...&redirect_uri=postMessage&origin=...while logged out — should redirect to sign-up/wallet🤖 Generated with Claude Code