2

What I want:

  • A user to connect a wallet to my dapp (1 of 4 choices, say: Metamask, WalletConnect, Formatic and Portis).
  • The flexibility to create a custom "wallet connect modal" (I've tried web3modal, which is great, and is ALMOST EXACTLY what I need, but lacks the customisation I need, design wise).

What I'm doing:

  • I'm building a front-end with React.js and TypeScript to interact with smart contracts on the Ethereum blockchain.

Any tips for libraries to consider or any help about how I should be going about this would be greatly appreciated.

5 Answers 5

3

Web3Modal

A single Web3 / Ethereum provider solution for all Wallets

https://www.npmjs.com/package/web3modal

https://github.com/web3modal/web3modal

1
  • Note that Web3model has received version 2.0 now which is a large upgrade. Commented Sep 29, 2022 at 12:41
1

Your best bet may be to use Noah Zinsmeister's web3-react. It is fully customizable and will let you achieve all of your goals.

Another alternative is Blocknative's Onboard achieves what you want. Their interface is relatively customizable.

Integration is very similar to that of the options you have tried so far.

1
  • This was a massive help. the web3-react library is amazing, thank you!
    – GMan1989
    Commented Feb 3, 2021 at 20:42
1

useDapp offers a multi-chain functionality:

useDapp Multichain

See a demo at example.usedapp.io/multichain

0

You can use Wagmi. It has lots of react hooks that make it easy to work with. you can have your custom design for each wallet connection option and trigger the connect or disconnect programmatically. And this is the example that I think you want to implement. https://wagmi.sh/examples/connect-wallet

0

Check out dynamic.xyz as well. It can work with wagmi.sh as well as with ethers.js directly, and you can also control colors/themes directly: https://docs.dynamic.xyz/docs/css-variables

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.