Question : ethers sign in
Answered by : wendel-rharael
import { ethers } from "ethers"
async function connect() { const provider = new ethers.providers.Web3Provider(window.ethereum, "any") await provider.send("eth_requestAccounts", []) const signer = provider.getSigner() const address = await signer.getAddress() // Always prints the address that I first connected with console.log(address)
}
Source : https://stackoverflow.com/questions/71926834/ethers-js-returns-the-same-wallet-address-even-if-i-switch-accounts | Last Update : Fri, 23 Sep 22