Skip to content

[PE-7307, PE-7308] Add coin redeem pages - #13390

Merged
Kyle-Shanks merged 3 commits into
mainfrom
kj-Add-web-coin-redeem-page
Nov 10, 2025
Merged

[PE-7307, PE-7308] Add coin redeem pages#13390
Kyle-Shanks merged 3 commits into
mainfrom
kj-Add-web-coin-redeem-page

Conversation

@Kyle-Shanks

Copy link
Copy Markdown
Contributor

Description

  • Add redeem page on web
  • Add redeem screen on mobile
  • Sets up deep linking on mobile to go to redeem screen
  • Add hooks for fetching the reward amount with and without code
  • Add hooks for claiming coin rewards with and without code
  • Some other stuff

How Has This Been Tested?

Needs more testing when SDK is updated

@changeset-bot

changeset-bot Bot commented Nov 7, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d931156

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

} catch (error) {
// Handle 400 errors
// Tells us if disburements for the coin have ended
if (error instanceof ResponseError) {

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.

could have stricter check here

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.

Yeah this should probably check the status code and the error message specifically.


return response
},
onSettled: (_, __, { mint }) => {

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.

mighttt need optimistic update, probably doesn't matter super much tho?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thought of this, but i dont know what i would update. I guess we could optimistically add the reward to the users coin balance, but seems overkill

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.

yeah would need amount. but watevs

import { BannerSection } from '../coin-details-screen/components/CoinInfoCard'

const messages = {
title: (ticker: string) => `Redeem $${ticker}`,

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.

sure the ticker doesn't already have $ on it? try with a prod coin, staging coins might be out of date

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.

no dollar sign on tickers by default

>
<ScreenContent>
<ScrollView>
<Flex column gap='m' ph='s' pv='2xl'>

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.

nit: column is default

<Flex column gap='xs'>
<Text variant='heading'>{coin?.name}</Text>
{rewardAmountPending ? (
<Box h={16} w={64}>

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.

nit: spacing vars

}

type PageContentProps = {
coin: Coin | undefined

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.

y no ?

@dharit-tan dharit-tan 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.

can u remind me the diff between code vs non-code redemptions?

@dylanjeffers dylanjeffers 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.

looks excellent!

})
queryClient.invalidateQueries({
queryKey: [QUERY_KEYS.artistCoinMembers, mint]
})

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.

nice nice

feature: Feature.ArtistCoins
})

// TODO: Should 'Please try again' be added to the end of the message?

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.

something to figure out now?

// Normalize ticker to uppercase
const normalizedTicker = ticker.toUpperCase()

if (coinRoute === 'redeem') {

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.

noice

import { BannerSection } from '../coin-details-screen/components/CoinInfoCard'

const messages = {
title: (ticker: string) => `Redeem $${ticker}`,

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.

no dollar sign on tickers by default

} catch (error) {
// Handle 400 errors
// Tells us if disburements for the coin have ended
if (error instanceof ResponseError) {

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.

Yeah this should probably check the status code and the error message specifically.

} catch (error) {
// Handle 400 errors
// Tells us if the code is invalid or already redeemed
if (error instanceof ResponseError) {

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.

This should have the same error shape as the info endpoint (tells you if invalid or already used), so also want to check 400 cases explicitly here.

mint,
userId: Id.parse(currentUserId),
code
})

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.

This needs 400 error handling similar to the other calls.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

shouldn't be getting here if the code in the first place if the code is used or invalid so no need for special cases

@Kyle-Shanks
Kyle-Shanks force-pushed the kj-Add-web-coin-redeem-page branch from 5221da3 to 6e274a7 Compare November 10, 2025 16:39
@Kyle-Shanks
Kyle-Shanks merged commit 83bcf85 into main Nov 10, 2025
3 of 4 checks passed
@Kyle-Shanks
Kyle-Shanks deleted the kj-Add-web-coin-redeem-page branch November 10, 2025 16:49
dylanjeffers pushed a commit that referenced this pull request Nov 10, 2025
### Description
* Add redeem page on web
* Add redeem screen on mobile
* Sets up deep linking on mobile to go to redeem screen
* Add hooks for fetching the reward amount with and without code
* Add hooks for claiming coin rewards with and without code
* Some other stuff

### How Has This Been Tested?
Needs more testing when SDK is updated
audius-infra pushed a commit that referenced this pull request Nov 15, 2025
[16d4c68] [PE-7289] Add artist social links on coin create (#13435) Dylan Jeffers
[714814d] [PE-7320] Add copy link coin overflow option (#13440) KJ
[108cdc1] [PE-7335] Increase slippage to 2% (#13432) Dylan Jeffers
[8a59173] [PE-7025] Fix optimistic fee claiming not working (#13431) JD Francis
[5e6438e] [PE-7336] Fix stripe mobile on-ramp visibility (#13439) Dylan Jeffers
[c6488b4] Revert "Increase max file size for uploads (#13430)" (#13436) Marcus Pasell
[f0d22bf] Drop trading volume launch banner (#13434) Dylan Jeffers
[e2d6f9e] Increase max file size for uploads (#13430) Marcus Pasell
[e16832d] [PE-7286] Update portfolio balance error text color (#13429) Dylan Jeffers
[92ee20d] [PE-7324] Prevent portfolio balance hovering from swiping page (#13426) Dylan Jeffers
[d520d7b] [PE-7287] Fix artist-coin description color (#13425) Dylan Jeffers
[c1bc62d] [PE-7315] Drop verify flow (#13410) Dylan Jeffers
[beb486a] [PE-7148] Update Upload coin gated track button to populate initial form data (#13424) KJ
[0bc129c] [PE-7121] Add tooltip for coin price in insights section (#13422) KJ
[12cbd20] [PE-7196] Fix coin balance loading state (#13420) KJ
[3c24888] [PD-488] Fix spacing in the coin details right section (#13423) KJ
[20f30bc] Version Packages (#13416) github-actions[bot]
[5c7cc68] [PE-7322] Fix comment reply right padding (#13417) KJ
[6fea43f] [PE-7325] Fix tip $AUDIO balance large after swap to $AUDIO (#13415) Reed
[74098b3] [PE-7288] Update edit coin description field height (#13413) KJ
[1f84141] Timeout image loading in case of hanging connections (#13409) Danny
[6fd0a97] Add DOM test output on web-test failures (#13383) JD Francis
[0fd54bc] [PE-7316] Update artist coin hover card width (#13412) Dylan Jeffers
[950757b] [PE-7315] Fix remix contest winners index (#13397) Dylan Jeffers
[09d0bbb] [PE-7204] Associate external wallet after swap (#13411) Dylan Jeffers
[6173e94] Format tickers for urls and hooks (#13402) KJ
[a0125db] Filter out unsupported challenges from notifs (#13408) Reed
[48ccd99] Drop photo requirement text (#13407) Dylan Jeffers
[23d315d] Fix takeover cta (#13406) KJ
[9a0cc8c] css lint fixes (#13405) KJ
[f8e35fc] Artist takeover (#13403) KJ
[a705fcd] Add banner (#13404) KJ
[cb4c07e] Ensure the token mint is set correctly in meteora dbc swaps (#13401) Marcus Pasell
[16da7c3] Fix bundlesize check (#13400) Dylan Jeffers
[6395893] Revert "[PE-7239] Fix issues due to stale local storage data (#13311)" (#13396) Dylan Jeffers
[2b8e0c9] [PE-7312] Update announcement notifs to link from notif data (#13395) KJ
[f96f996] Fix user track filter type (#13394) Dylan Jeffers
[83bcf85] [PE-7307, PE-7308] Add coin redeem pages (#13390) KJ
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.

4 participants