Skip to content

Commit

Permalink
Improve handling of PRIVATE_KEY env var
Browse files Browse the repository at this point in the history
Now matches what we were already doing in the advanced JS project.

Addresses review comment #1770 (comment)
  • Loading branch information
feuGeneA committed Sep 21, 2021
1 parent aa7976f commit 48a4c56
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const config: HardhatUserConfig = {
networks: {
ropsten: {
url: process.env.ROPSTEN_URL || "",
accounts: [process.env.PRIVATE_KEY || `0x${"0".repeat(40)}`],
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
gasReporter: {
Expand Down

0 comments on commit 48a4c56

Please sign in to comment.