Uniswap / web3-react

A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps
https://web3-react-mu.vercel.app/
GNU General Public License v3.0
5.55k stars 1.52k forks source link

InjectedConnector in V8 #738

Open chef-plankton opened 1 year ago

chef-plankton commented 1 year ago

How can I use INJECTED package in v8? And when the version gets into stable version? I want to add binance wallet into my dapp using v8.

niZmosis commented 1 year ago

The Injected package is @web3-react/metamask in v8.

chef-plankton commented 1 year ago

The Injected package is @web3-react/metamask in v8.

So can we use it to add binance wallet? 🤔

niZmosis commented 1 year ago

There's features in there that not all Injected connectors support, but yea. Set the mustBeMetaMask flag in the constructor to false. Really you'd want to make BSC as it's own connector but I am interested in how far you get with it. You may get other problems depending on what wallets you have installed. If you have CB and MM or and injected connector, CB will always pop up asking you to choose what connector you really want, and I'm not sure if it will show Binance Wallet, probably click on the MM button then it will go to Binance. I dunno.

chef-plankton commented 1 year ago

There's features in there that not all Injected connectors support, but yea. Set the mustBeMetaMask flag in the constructor to false. Really you'd want to make BSC as it's own connector but I am interested in how far you get with it. You may get other problems depending on what wallets you have installed. If you have CB and MM or and injected connector, CB will always pop up asking you to choose what connector you really want, and I'm not sure if it will show Binance Wallet, probably click on the MM button then it will go to Binance. I dunno.

Great. Thanks man. I think that web3react should add more wallets support as soon as possible

niZmosis commented 1 year ago

@chef-plankton I made a BSC connector, its in this PR. Unfortunately the build is failing on vercel, but you can pull out the code for the bsc wallet. The build will run on your machine locally.

chef-plankton commented 1 year ago

@chef-plankton I made a BSC connector, its in this PR. Unfortunately the build is failing on vercel, but you can pull out the code for the bsc wallet. The build will run on your machine locally.

Awesome. I will check it ASAP