Claim vested coins flow QA - #13335
Conversation
🦋 Changeset detectedLatest commit: 9b71106 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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) |
There was a problem hiding this comment.
should probably use FixedDecimal? also, should this be claimed or claimable?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
rewardsPoolClaimedAmount is a string -> parseFloat
| ? Math.floor((claimable * rewardsPoolPercentage) / 100) | ||
| : 0 | ||
| const yourShareAmount = new FixedDecimal( | ||
| BigInt(Math.round((claimable * yourSharePercentage) / 100)), |
There was a problem hiding this comment.
yes otherwise it becomes a float which can't be cast to bigint
[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
Description
How Has This Been Tested?
Tested on local web stage