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

[bug] not working as expected when setting preference to "smartWalletOnly" #2053

Closed
1 task done
KarmanMax opened this issue Jun 14, 2024 · 9 comments
Closed
1 task done

Comments

@KarmanMax
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

RainbowKit Version

2.1.2

wagmi Version

2.9.10

Current Behavior

Case: the CoinbaseWallet extension enabled, and the coinbaseWallet's preference set to "smartWalletOnly", select Coinbase in the connect modal.

Behavior: it's not connecting to the Coinbase smart wallet as expected, it's connecting to the CoinbaseWallet extension instead.

Expected Behavior

always connect to the Coinbase smart wallet when the coinbaseWallet's preference set to "smartWalletOnly", whatever CoinbaseWallet extension(or mobile app) is available.

Steps To Reproduce

No response

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

@magiziz
Copy link
Contributor

magiziz commented Jun 14, 2024

@KarmanMax Can you provide a small reproducible example ?

@KarmanMax
Copy link
Author

@KarmanMax Can you provide a small reproducible example ?
sure. here is a simple example:
https://github.com/KarmanMax/rainbow-test

@magiziz
Copy link
Contributor

magiziz commented Jun 16, 2024

@KarmanMax I'm able to get the coinbase smart wallet window popup. Can you try in incognito mode ?

image

If we detect that you have coinbase wallet browser extension we would rather use that than the smart wallet option.

@magiziz
Copy link
Contributor

magiziz commented Jun 17, 2024

@KarmanMax Any luck ?

@KarmanMax
Copy link
Author

KarmanMax commented Jun 18, 2024

If we detect that you have coinbase wallet browser extension we would rather use that than the smart wallet option.

that's the issue I want to talk about here. As the preference named "smartWalletOnly", I thought it expects to always use the smart wallet whatever there is a coinbase wallet extension.

Actually what I want is something like what stargate does, which provides coinbase extension and smart wallet separately and the smart wallet option always popup the smart wallet connect modal whatever there is a coinbase wallet extension.
And I want to implement this in rainbowkit, I tried adding a custom coinbaseWallet with preference set to "smartWalletOnly" but it doesn't behavior in that way. it will use coinbase wallet extension when the extension is available.

@magiziz
Copy link
Contributor

magiziz commented Jun 18, 2024

@KarmanMax I see. You could create your own coinbaseWallet, but remove the rdns field and set preference to "smartWalletOnly". Can you try doing that and let me know if it works ?

@KarmanMax
Copy link
Author

it works! thanks a lot @magiziz

@magiziz magiziz closed this as completed Jun 27, 2024
@Forsect
Copy link

Forsect commented Nov 21, 2024

Hey guys, I have the same problem but the other direction - I want to set the eoaOnly preference to coinbaseWallet. It works great on mobile and incognito desktop browser - what I mean by that it does not suggest the smart wallet option and asks me to get app/extension instead. Great! But as soon as I have the extension, on top of its popup there is a string with action:
Using browser extension. Switch to smart wallet

Same as the OP, I was hoping there won't be a way to use the smart wallet, but looks like there is. In my app flow, it breaks, and I don't want that. Unfortunately, from what I see it's not like the extension has always "prio" and I am hoping user won't click it - sometimes the "smart wallet" has a prio and now it definitely will break. Can I do anything about that? Like block this option from showing up and make it truly "eoaOnly"?

@DanielSinclair
Copy link
Collaborator

@Forsect I wasn't able to reproduce that issue. It seems to work as expected for me, prioritizing the extension. Maybe try updating Wagmi/Viem to pull in the latest Coinbase peer dependency, and clearing cookies/cache for the Coinbase domains Screenshot 2024-12-04 at 3 56 54 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants