Skip to content

feat: Token Picker component #1683

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

Closed
wants to merge 2 commits into from

Conversation

mykcryptodev
Copy link
Contributor

@mykcryptodev mykcryptodev commented Nov 28, 2024

What changed? Why?
Add a component that composes the , and to give builders an easy way for users to pop a modal for finding and selecting a token

Notes to reviewers
This PR also adds the Token Picker to the playground. I noticed other Token components are not there so I am happy to remove if desired.

The token picker modal allows you to focus, scroll and select tokens with your keyboard.

To test this locally you may have to add this to the TokenPicker for search to work

import { setOnchainKitConfig } from '../../OnchainKitConfig';
import { base } from 'viem/chains';

export function TokenPicker({
  pickedToken,
  onTokenPicked,
  defaultTokens,
  className,
  onError,
}: TokenPickerProps) {
setOnchainKitConfig({
    apiKey: "YOUR_KEY",
    chain: base,
  });
  ...

How has it been tested?
Added unit tests and tested in local playground

tokenpicker.mov

Copy link

vercel bot commented Nov 28, 2024

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ❌ Failed (Inspect) Nov 28, 2024 3:50pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 28, 2024 3:50pm

Copy link

vercel bot commented Nov 28, 2024

Someone is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@fakepixels
Copy link
Contributor

This looks so great! Thank you so much for the contribution.

@dgca
Copy link
Contributor

dgca commented Apr 23, 2025

Hey @mykcryptodev, really sorry we haven't reviewed this. We've made some significant changes to the project since this PR was open, and we're currently pushing towards the v1 release.

Do you want to get this PR up to date with the latest state of main and have us review it?

If so, just tag me after you've updated this branch. Otherwise, you could close this PR and we can revisit after v1.

@dgca
Copy link
Contributor

dgca commented Apr 29, 2025

Closing this out since since it's quite out of date. Happy to help get this integrated in the future

@dgca dgca closed this Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants