Skip to content

Add handle param to oauth/pay#14039

Merged
raymondjacobson merged 1 commit intomainfrom
ray/oauth-pay-handle-param
Apr 2, 2026
Merged

Add handle param to oauth/pay#14039
raymondjacobson merged 1 commit intomainfrom
ray/oauth-pay-handle-param

Conversation

@raymondjacobson
Copy link
Copy Markdown
Member

@raymondjacobson raymondjacobson commented Apr 2, 2026

Summary

  • Adds handle as an alternative to recipient in /oauth/pay, allowing callers to specify an Audius user handle instead of a raw Solana address
  • Resolves handle → user → derives user bank address client-side (pure PDA math, no RPC call) for instant UI rendering
  • Bundles user bank creation (if needed) + transfer into a single atomic Solana transaction at confirm time, eliminating the separate on-chain create tx
  • New createUserBankIfNeededInstruction method on ClaimableTokensClient returns the instruction without sending a tx, enabling callers to compose it into their own transactions
  • UI shows @handle with the derived address below when handle mode is used

Test plan

  • /oauth/pay?handle=raymont&mint=...&amount=... resolves and displays correctly
  • /oauth/pay?recipient=...&mint=...&amount=... continues to work as before
  • Providing both handle and recipient shows error
  • Invalid handle shows appropriate error
  • Payment succeeds in single transaction (user bank creation + transfer)
  • Verify with user who has no existing user bank for the mint

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

⚠️ No Changeset found

Latest commit: 6bb7bfc

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

Support `handle` as an alternative to `recipient` in /oauth/pay. When
provided, the handle is resolved to a user, their user bank address is
derived client-side (no RPC), and account creation (if needed) is
bundled into a single atomic transaction with the transfer at confirm
time — eliminating the loading spinner from eager on-chain calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raymondjacobson raymondjacobson force-pushed the ray/oauth-pay-handle-param branch from aec3d42 to 6bb7bfc Compare April 2, 2026 06:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🌐 Web preview ready

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

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

@raymondjacobson raymondjacobson merged commit 95fe65e into main Apr 2, 2026
15 checks passed
@raymondjacobson raymondjacobson deleted the ray/oauth-pay-handle-param branch April 2, 2026 06:41
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.

1 participant