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

Injected connector #1026

Open
carletex opened this issue Jan 5, 2025 · 2 comments · May be fixed by #1028
Open

Injected connector #1026

carletex opened this issue Jan 5, 2025 · 2 comments · May be fixed by #1028
Assignees
Labels
discussion Further information is discussed

Comments

@carletex
Copy link
Member

carletex commented Jan 5, 2025

Wagmi v2 supports injected connectors (unstable connector :D), so you can use your connected wallet as the transport for your RPC request. As the name state (and docs) state it's not stable (same as public RPCS) but we could consider it as fallbacks.

https://wagmi.sh/react/api/transports/unstable_connector

Should we use it? At least like when the default API Key is not changed:

rpcFallbacks = isUsingDefaultKey ? [http(), unstable_connector(injected), http(alchemyHttpUrl)] : [http(alchemyHttpUrl), http()];

(this is just me overthinking after checking the Alchemy usage :D)

@carletex carletex added the discussion Further information is discussed label Jan 5, 2025
@rin-st
Copy link
Member

rin-st commented Jan 6, 2025

Good point, I think it's a way to go. Maybe even add it when there is a non-default API key

rpcFallbacks = isUsingDefaultKey ? [http(), unstable_connector(injected), http(alchemyHttpUrl)] : [http(alchemyHttpUrl), http(), unstable_connector(injected)];

@technophile-04
Copy link
Collaborator

Noicee yup lets do it and niceee find 🙌

Good point, I think it's a way to go. Maybe even add it when there is a non-default API key

++

I can't think any downside of having unstable_connector as fallback, probably switching chains might cause some problem maybe not sure but yeah we should go with for sure!!

@technophile-04 technophile-04 self-assigned this Jan 9, 2025
@technophile-04 technophile-04 linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Further information is discussed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants