Automatically adding to metamask custom blockchain via HTTP instead of HTTPS RPCs? #1636
Unanswered
JavierFerrerGomez
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@JavierFerrerGomez Are you able to add a network manually and then use the RainbowKit + Wagmi ? This seems to be something that's controlled by Viem and Wagmi for how they add chains into the wallet. Feel free to follow metamask's docs here: https://docs.metamask.io/wallet/how-to/get-started-building/run-devnet/ Let me know if it doesn't work 👍 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a hardhat node hosted in an external domain to test our daps. I really like the Rainbowkit feature that adds the blockchain to Metamask if the chain is not already configured. The problem I have is that it doesn't seem to work with my setup because we are serving via http instead of https.
If I try to connect to Metamask with this code it will throw the error:
inpage.js:1 MetaMask - RPC Error: Expected an array with at least one valid string HTTPS url 'rpcUrls', Received: http://mydomain:20666
I understand the reason why this is default behavior, but there is a way to explicitly tell Rainbowkit (or viem) to allow an external http conection? If I configure Metamask manually everything works as expected.
RainbowKit version: 1.0.2
Viem version: 1.0.7
Wagmi: 1.4.7
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions