Skip to content

Commit

Permalink
Fix typing, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
vanja-vechain committed Jun 27, 2023
1 parent 6997327 commit 36a3572
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/ethers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"description": "Hardhat Vechain Ethers Plugin",
"repository": "github:vechainfoundation/hardhat-plugins",
"author": "Electi Consulting LTD",
"main": "dist/index.js",
"keywords": [
"thor",
"vechain",
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const modified = (provider: ConnexProviderWrapper) => {
}

extendEnvironment(hre => {
if (hre.vechain === undefined) {
if (!hre.network.name.includes("vechain")) {
throw new VechainHardhatPluginError("vechain-ethers plugin requires hardhat-vechain");
}
hre.ethers = lazyObject(() => {
if (hre.vechain === undefined) {
if (!hre.network.name.includes("vechain")) {
throw new VechainHardhatPluginError("@vechain/hardhat-ethers expects @vechain/hardhat-vechain");
}

Expand Down
1 change: 1 addition & 0 deletions packages/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"description": "Hardhat Vechain Web3 Plugin",
"repository": "github:vechainfoundation/hardhat-plugins",
"author": "Electi Consulting LTD",
"main": "dist/index.js",
"keywords": [
"thor",
"vechain",
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { VechainHardhatPluginError } from "@vechain/hardhat-vechain";
import "./type-extensions";

extendEnvironment(hre => {
if (hre.vechain === undefined) {
if (!hre.network.name.includes("vechain")) {
throw new VechainHardhatPluginError("vechain-web3 plugin requires hardhat-vechain");
}
hre.Web3 = lazyFunction(() => require("web3"));
Expand Down

0 comments on commit 36a3572

Please sign in to comment.