Let people read a market without a wallet - #78
Open
Conversation
Every screen was gated, so the app's entire public surface was a button and nothing anywhere said what the product does. Pools, phases and countdowns were already public — useRounds keeps the per-address batch separate. The only thing forcing a connection was the asset's decimals, fetched through useVaultPosition, whose purpose is per-address state. Exports useVaultAsset instead. The market page is ungated too: GHO-41 made a market's address its URL so it could be shared, and a shared link answering "connect a wallet" cannot show the recipient what they were sent. Adds a landing surface stating the mechanism, and what happens when a position goes against you at the same size as what happens when it does not. Side buttons stay live and answer with a connect prompt, so the ask arrives once there is a reason to say yes.
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.
Closes GHO-44.
Stacked on #77 — the landing figures come from
useLendingTerms, which that PR adds. Review after it merges, or base-diff only.Every screen was gated, so the app's public surface was a button, and nothing anywhere said what GhostStake does.
Almost nothing had to change:
useRoundsalready keeps the per-address batch separate, so pools, phases and countdowns already resolved disconnected. The whole gate wasposition.decimals— a property of the asset, reached through the per-address hook. ExportsuseVaultAsset./marketsand/markets/[market]read without a wallet. The market page was not in the issue, but GHO-41 made a market's address its URL so it could be shared, and a shared link answering "connect a wallet" cannot show the recipient what they were sent. The round page under it was already public.formatOptionalpromoted tolib/format.ts—tsccaught thevalue && format(value)trap a second time, unprompted.Verified against the prerendered HTML (which previously shipped the gate) and by curling the dynamic market route. Detail in ADR 0045 and runbook Part 7.52.