diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 174b62b..69149bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,4 +12,4 @@ jobs: node-version: 12 - run: npm install - run: npm run build - - run: npm run test-contract + - run: npm run test:contract diff --git a/package-lock.json b/package-lock.json index 56b82a0..33c1d40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@safient/contracts", - "version": "0.1.14-alpha", + "version": "0.1.15-alpha", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@safient/contracts", - "version": "0.1.14-alpha", + "version": "0.1.15-alpha", "dependencies": { "@ethersproject/address": "^5.2.0", "@ethersproject/bignumber": "^5.2.0", diff --git a/package.json b/package.json index 31c78b1..b0c3624 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@safient/contracts", - "version": "0.1.15-alpha", + "version": "0.1.16-alpha", "description": "JavaScript SDK to manage and interact with the safe claims on Safient protocol.", "keywords": [ "Web3", @@ -15,10 +15,10 @@ "compile": "hardhat compile", "chain": "hardhat node", "deploy": "hardhat run scripts/deploy.js", - "deploy-sdk": "npm run deploy && npm run build", - "test-contract": "hardhat test --network hardhat", - "test-sdk": "mocha test-sdk/claims.js --timeout 100000", - "tests": "npm run test-contract && npm run test-sdk", + "deploy:sdk": "npm run deploy && npm run build", + "test:contract": "hardhat test --network hardhat", + "test:sdk": "mocha test-sdk/claims.js --timeout 100000", + "test": "npm run test-contract && npm run test-sdk", "generate": "hardhat generate", "account": "hardhat account", "build": "tsc -p tsconfig.json", diff --git a/src/utils/networks.js b/src/utils/networks.js index 7c7743b..2314e45 100644 --- a/src/utils/networks.js +++ b/src/utils/networks.js @@ -1,6 +1,7 @@ const dotenv = require('dotenv'); -dotenv.config() +dotenv.config(); +const INFURA_API_KEY = process.env.INFURA_API_KEY || process.env.REACT_APP_INFURA_API_KEY; const networks = { localhost: { @@ -9,11 +10,11 @@ const networks = { }, mainnet: { chainId: 1, - url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, + url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`, }, kovan: { chainId: 42, - url: `https://kovan.infura.io/v3/${process.env.INFURA_API_KEY}`, + url: `https://kovan.infura.io/v3/${INFURA_API_KEY}`, }, polygontestnet: {