Skip to content

Claim vested coins flow QA - #13335

Merged
dharit-tan merged 5 commits into
mainfrom
rt-vest-small
Oct 31, 2025
Merged

Claim vested coins flow QA#13335
dharit-tan merged 5 commits into
mainfrom
rt-vest-small

Conversation

@dharit-tan

@dharit-tan dharit-tan commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Description

  • optimistic balance updating
  • correct balance formatting
  • hide claim buttons on mobile web

How Has This Been Tested?

Tested on local web stage

@changeset-bot

changeset-bot Bot commented Oct 29, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9b71106

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@audius/sdk Patch
@audius/sdk-legacy Patch
@audius/sp-actions Patch

Not sure what this means? Click here to learn what changesets are.

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

)
return existingCoin

const claimedAmount = parseFloat(data.availableAmount)

@faridsalau faridsalau Oct 31, 2025

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.

should probably use FixedDecimal? also, should this be claimed or claimable?

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.

i think availableAmount is correct - we claimed the total available amount, and we wanna subtract that from the locked amount and add it to the unlocked amount.

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.

and i actually think fixedDecimal is used for UI/representation, and shouldn't be used for actual math. we'd have to cast to bigint inside the fixedDecimal constructor anyway, which also doesn't work with floats.

...existingCoin.rewardPool,
balance:
(existingCoin.rewardPool.balance ?? 0) +
parseFloat(data.rewardsPoolClaimedAmount ?? '0')

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.

number ?? string?

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.

rewardsPoolClaimedAmount is a string -> parseFloat

? Math.floor((claimable * rewardsPoolPercentage) / 100)
: 0
const yourShareAmount = new FixedDecimal(
BigInt(Math.round((claimable * yourSharePercentage) / 100)),

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.

do we need Math.round?

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.

yes otherwise it becomes a float which can't be cast to bigint

Comment thread packages/web/src/pages/coin-detail-page/components/CoinInfoSection.tsx Outdated
Comment thread packages/web/src/pages/coin-detail-page/components/CoinInfoSection.tsx Outdated
@dharit-tan dharit-tan changed the title Small updates to claim vested coins flow Claim vested coins flow QA Oct 31, 2025
@dharit-tan
dharit-tan merged commit 98da331 into main Oct 31, 2025
8 of 12 checks passed
@dharit-tan
dharit-tan deleted the rt-vest-small branch October 31, 2025 21:46
audius-infra pushed a commit that referenced this pull request Nov 1, 2025
[98da331] Claim vested coins flow QA (#13335) Reed
[0216cc9] [PE-7255] Add user balance history graph (#13337) Dylan Jeffers
[fb07b7a] [PE-7256|PE-7257] Rework artist coins list & create add cash page (#13341) JD Francis
[20bbd05] Drop donation (#13346) Dylan Jeffers
[c6de169] Fix exclusive tracks section playback (#13348) Dylan Jeffers
[eb8b147] Add error state if jup quote fails (#13344) Reed
[0903d80] Select artist-coin flair fixes (#13345) Dylan Jeffers
[e01065d] [PE-7266] Add coin exclusive tracks to coin page (#13332) Dylan Jeffers
[0aef321] Update FixedDecimal to support scientific notation (#13339) Marcus Pasell
[096aa76] [PE-7232] Fix smart tab behavior for external wallets + fix unauth buy button coins table (#13336) JD Francis
[1e2e0a6] [PE-7252] Always show user's launched coin (#13334) Reed
[da27d25] Version Packages (#13331) github-actions[bot]
[c13483e] Drop rights and covers feature flag (#13324) Dylan Jeffers
[28791a9] Add artist coin flair selector feature (#13317) Farid Salau
[2625849] [PE-7253] Fix web explore page title (#13326) Reed
[c275d11] Fix web lint (#13325) Reed
[46ad234] [PE-7237] Claim vested coins flow (#13307) Reed
[57b5340] Drop ai-attribution (#13321) Dylan Jeffers
[99e2e8c] Drop track replace flag (#13323) Dylan Jeffers
[705381c] [PE-7249] Invalidate artist-coin on buy/sell/swap (#13322) Dylan Jeffers
[87dbc94] [PE-7235] Fix pay with anything token picker (#13316) Dylan Jeffers
[bfadb5b] Revert "Artist coins page size 1000 (#13313)" (#13320) Reed
[452326b] Revert "[PE-7204] Associate wallets on solana /relay calls" (#13314) JD Francis
audius-infra pushed a commit that referenced this pull request Nov 3, 2025
[42ff097] [PE-7272] Solana relay endpoints to do swaps direct through DBC (#13351) JD Francis
[98da331] Claim vested coins flow QA (#13335) Reed
[c156f12] Skip unrecognized challenge_ids (#13315) Ray Jacobson
[5679e39] [API-369] Skip ratio check for dvl challenge (#13349) Randy Schott
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.

3 participants