Skip to content

Commit 1b05d2e

Browse files
authored
Fixed ether command on Ethereum Client APIs
Fixed ether command on Ethereum Client APIs Changed ethers.providers.Web3Provider(window.ethereum) to ethers.BrowserProvider(window.ethereum) & also Wallet.fromMnemonic(mnemonics) to Wallet.fromPhrase(mnemonics)
1 parent bae037f commit 1b05d2e

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Using providers, these libraries allow you to connect to Ethereum and read its d
3131
```js
3232
// A Web3Provider 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)