Skip to content

Commit aecaec7

Browse files
authored
Merge pull request #13105 from pglekshmi/patch-1
Fixed ether command on Ethereum Client APIs
2 parents e80543d + 3875f6b commit aecaec7

File tree

1 file changed

+3
-3
lines changed
  • public/content/developers/docs/apis/javascript

1 file changed

+3
-3
lines changed

public/content/developers/docs/apis/javascript/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Using providers, these libraries allow you to connect to Ethereum and read its d
2929
**Ethers example**
3030

3131
```js
32-
// A Web3Provider wraps a standard Web3 provider, which is
32+
// A BrowserProvider wraps a standard Web3 provider, which is
3333
// what MetaMask injects as window.ethereum into each page
34-
const provider = new ethers.providers.Web3Provider(window.ethereum)
34+
const provider = new ethers.BrowserProvider(window.ethereum)
3535

3636
// The MetaMask plugin also allows signing transactions to
3737
// send ether and pay to change state within the blockchain.
@@ -80,7 +80,7 @@ Here's an examples from Ethers
8080
// Create a wallet instance from a mnemonic...
8181
mnemonic =
8282
"announce room limb pattern dry unit scale effort smooth jazz weasel alcohol"
83-
walletMnemonic = Wallet.fromMnemonic(mnemonic)
83+
walletMnemonic = Wallet.fromPhrase(mnemonic)
8484

8585
// ...or from a private key
8686
walletPrivateKey = new Wallet(walletMnemonic.privateKey)

0 commit comments

Comments
 (0)