I installed @ethersproject/wordlists, version 5.7.0, and I tried something like
import { ethers } from "ethers";
import { langEs as es } from "@ethersproject/wordlists";
ethers.Wordlist.register(es);
But it didn't work, printing ethers.wordlists didn't show es but just en.
I ended up doing this:
import { ethers } from "ethers";
import { langEs as es } from "@ethersproject/wordlists/lib/lang-es";
import {
langZhCn as zh_cn,
langZhTw as zh_tw,
} from "@ethersproject/wordlists/lib/lang-zh";
ethers.wordlists.es = es;
ethers.wordlists.zh = zh_cn;
ethers.wordlists.zh_cn = zh_cn;
ethers.wordlists.zh_tw = zh_tw;
Ethers Version
5.7.0
Search Terms
wordlist
Describe the Problem
I'm using
ethers.js
in the browser. I tried to register new wordlists following the documentation.I installed
@ethersproject/wordlists
, version5.7.0
, and I tried something likeBut it didn't work, printing
ethers.wordlists
didn't showes
but justen
.I ended up doing this:
Code Snippet
No response
Contract ABI
No response
Errors
No response
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli)
Environment (Other)
No response