fix(rewards): stop the upgrade screen contradicting its own balance - #2538
Merged
Merged
Conversation
…Fuse - The membership "Learn more" pointed at docs.solid.money/rewards/tiers, which is not a URL we serve. It now points at the rewards terms on support.solid.xyz. That was the only occurrence, in any of the four repos. - The route switch's label is styled entirely through StyleSheet now, with no className at all. The colour was already an inline style; the weight and size follow it so nothing about the label depends on class resolution, which is what turned a black-on-white label white-on-white. Matches how TierUpgradeCard and TierSwitcher write theirs. - The deposit-address screen opened on Ethereum. That address is the user's Safe on whichever chain is selected — it is not a bridge, so a deposit made on the default lands on the default, and Ethereum is both the most expensive gas and the one chain the balance cannot then be used from. It opens on Fuse/USDC: the card, the vaults and the annual membership charge are all on Fuse, and the membership charge can only ever move Fuse USDC.e. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGzkz4QFpEZVg6GpNH311x
Three reports, two causes. The screen compares balances to the sixth decimal and displays them as whole FUSE, and rounded the display to nearest. A Safe holding 14,999.6 FUSE showed "15,000" next to a requirement of "15,000" and still offered "Top up" — with a footer reading "0 FUSE short — add more to Savings", a shortfall too small to render printed as zero and a top-up of nothing to act on. Held amounts now round DOWN and shortfalls round UP, so the displayed numbers can never claim the user has enough when they do not, and a sub-unit gap is stated as the 1 FUSE that would actually clear it. The footer is hidden entirely once there is no shortfall left to state. Deliberately not fixed by loosening the comparison to match the display. Locking short of the threshold succeeds on-chain and grants no tier — the backend measures the locked position against it — so a user waved through on a rounded balance commits their FUSE for a year and gets nothing. The tolerance that was added, 1e-9, exists only to absorb the ulps of a bigint that has been through a decimal string and a double; it is nine orders of magnitude below anything anyone could be short by, and a test pins that 49,999.999 against 50,000 is still refused. Separately, the balances never refreshed: `staleTime` with no interval, on a screen whose whole job is to notice a deposit arriving. The top-up it sends the user to settles somewhere else — the savings sheet, or the deposit drawer — so nothing invalidated this on the way back, and the CTA stayed "Top up" with the FUSE already in the Safe. Now polled every 5s, roughly one Fuse block, and refetched on mount and focus. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGzkz4QFpEZVg6GpNH311x
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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.
No description provided.