Skip to content

Connect_to_Wallet #364

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ashthecoder05
Copy link
Collaborator

created a button to connect to any wallet add-ons

created a button to connect to any wallet add-ons
const connectBtn = document.getElementById('connect-wallet');

connectBtn.addEventListener('click', async () => {
const provider = new ethers.providers.Web3Provider(window.ethereum);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the injected window.ethereum will work for browser extensions.

To support web app wallets (Coinbase), hardware wallets (Ledger), and mobile wallets (Trust, Metamask mobile app), we can consider using an existing package like Web3Modal (Demo). This will support a larger number wallets and avoids us dealing with connectors for each wallet type.

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

Successfully merging this pull request may close these issues.

2 participants