docs: add MetaMask request info (#2535).
This commit is contained in:
parent
3df0e06c64
commit
4935f93015
@ -88,6 +88,9 @@ _code: Connecting to MetaMask @lang<script>
|
||||
// what MetaMask injects as window.ethereum into each page
|
||||
const provider = new ethers.providers.Web3Provider(window.ethereum)
|
||||
|
||||
// MetaMask requires requesting permission to connect users accounts
|
||||
await provider.send("eth_requestAccounts", []);
|
||||
|
||||
// The MetaMask plugin also allows signing transactions to
|
||||
// send ether and pay to change state within the blockchain.
|
||||
// For this, you need the account signer...
|
||||
|
Loading…
Reference in New Issue
Block a user