Skip to content

Commit

Permalink
Update package depndencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Aug 7, 2023
1 parent d1d0894 commit 5e66c75
Show file tree
Hide file tree
Showing 3 changed files with 306 additions and 1,704 deletions.
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"@types/lockfile": "^1.0.2",
"bip39": "^3.1.0",
"deepmerge": "^4.3.1",
"ethers": "^5.0.2",
"ethers": "^6.7.0",
"expand-tilde": "^2.0.2",
"find-up": "^6.3.0",
"got": "12.4.1",
"got": "^11.8.6",
"inquirer": "^9.1.5",
"js-yaml": "^4.1.0",
"lockfile": "^1.0.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/util/ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ export async function getEthersSigner({
const keystoreJson = fs.readFileSync(keystorePath, "utf8");
const wallet = await ethers.Wallet.fromEncryptedJson(keystoreJson, keystorePassword);
const eth1Provider = rpcUrl
? new ethers.providers.JsonRpcProvider(rpcUrl)
: new ethers.providers.InfuraProvider({name: "deposit", chainId});
? new ethers.JsonRpcProvider(rpcUrl)
: new ethers.InfuraProvider({name: "deposit", chainId});
return wallet.connect(eth1Provider);
}

if (rpcUrl) {
const signer = new ethers.providers.JsonRpcProvider(rpcUrl).getSigner();
const signer = await new ethers.JsonRpcProvider(rpcUrl).getSigner();
if (rpcPassword) {
await signer.unlock(rpcPassword);
}
return signer;
}

if (ipcPath) {
return new ethers.providers.IpcProvider(ipcPath).getSigner();
return await new ethers.IpcSocketProvider(ipcPath).getSigner();
}

throw Error("Must supply either keystorePath, rpcUrl, or ipcPath");
Expand Down
Loading

0 comments on commit 5e66c75

Please sign in to comment.