coinbase / onchainkit

React components and TypeScript utilities to help you build top-tier onchain apps.
https://onchainkit.xyz
MIT License
604 stars 150 forks source link

Feature Request: Customization of Fund Wallet Link #1125

Open mykcryptodev opened 2 months ago

mykcryptodev commented 2 months ago

Describe the solution you'd like

I would like the ability to customize the fund wallet link so that I can put it anywhere in my app.

For example, an app that relies heavily on USDC may want to show the USDC balance of the connected user at all times

Screenshot 2024-08-21 at 10 04 31 AM

Ideally, I would like to be able to give the component children like this:

<WalletDropdownFundLink>
    <TokenChip token={USDC} />
<WalletDropdownFundLink>

or accept a render prop that returns a jsx element <WalletDropdownFundLink render={() => <TokenChip token={USDC} />}

This would me to follow a familiar UX pattern for depositing funds like in draft kings for example where your balance is always visible and depositing more funds is just a tap away (I cannot wait to make it this easy to get onchain apps funded)

RPReplay_Final1724249664-ezgif com-video-to-gif-converter

This request is related to #742

Describe alternatives you've considered.

I've considered placing the balance chip inside of the connect wallet component so that when it is clicked, the wallet dropdown with the funding option is visible. It's a good compromise for now but ideally, I would like the act of depositing to require less mental-load on the user by separating their balancing into a different chip and having one tap to open the deposit flow.

Screenshot 2024-08-21 at 10 20 36 AM

mykcryptodev commented 2 months ago

I thought about it some more and was able to make two dropdowns with different options to make it feel more streamlined.

Screenshot 2024-08-21 at 2 19 28 PM

fakepixels commented 2 months ago

Very creative premise. :~) Let's brainstorm the intuitive flow here.

Zizzamia commented 2 months ago

@mykcryptodev love this idea, and just know @mindapivessa already prepared some design for us to start coding to it.

Expect some progress on this topic in the next 2 weeks.