-
const encryptedJson = fs.readFileSync("./.encryptkey.json", "utf8");
let wallet = new ethers.Wallet.fromEncryptedJson(
encryptedJson,
process.env.PRIVATE_KEY_PASSWORD
);
wallet = await wallet.connect(provider); |
Beta Was this translation helpful? Give feedback.
Answered by
LordReya
Jun 5, 2022
Replies: 1 comment 2 replies
-
You forgot the sync at new ethers.wallet.fromEncryptedJsonSync It should be like this:
Let me know if that helps :) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
OIU2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You forgot the sync at new ethers.wallet.fromEncryptedJsonSync It should be like this:
Let me know if that helps :)