Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Enable auto logged in components on landing page #1754

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

cpcramer
Copy link
Contributor

@cpcramer cpcramer commented Dec 17, 2024

What changed? Why?
Create new demo app provider which includes our auto logged in demo wallet. This is to achieve a "logged in" state for our components on the landing page, allowing users to see the intended components rather than a bunch of Connect Wallet buttons.

For now, we are only auto logging in for the Wallet and Swap component. The Fund and Transaction component would have to be set to disabled. We've decided that it's better to leave these and allow the user to connect their own wallet to test out the functionality.

Screenshot 2024-12-17 at 1 19 56 PM Screenshot 2024-12-17 at 1 20 04 PM

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 11:28pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 11:28pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 11:28pm

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 17, 2024
const queryClient = new QueryClient();

const demoWalletConnector = () => () => {
const demoWalletPK = import.meta.env.VITE_DEMO_WALLET_PK;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This demo wallet will never have a value associated with it therefore I believe it's fine to leak the PK in the client.

@@ -61,10 +59,9 @@ function WalletDemo() {
Wallet
</WalletDropdownLink>
<WalletDropdownBasename />
<WalletDropdownDisconnect />
Copy link
Contributor

Choose a reason for hiding this comment

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

given that we are removing disconnect option, consider adding a warning like, "wallet address for demonstration purposes only. do not send funds to this address"

@cpcramer cpcramer merged commit cf80456 into main Dec 17, 2024
16 checks passed
@cpcramer cpcramer deleted the paul/auto-logged-in-components branch December 17, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Development

Successfully merging this pull request may close these issues.

3 participants