Add ENV variables for providers

This commit is contained in:
Mikhail Mikheev 2019-10-23 14:42:08 +04:00
parent 51a01ef11a
commit 1c6581e496
2 changed files with 8 additions and 5 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ build_storybook/
.DS_Store .DS_Store
build/ build/
yarn-error.log yarn-error.log
.env.*

View File

@ -13,31 +13,33 @@ import Button from '~/components/layout/Button'
import { fetchProvider } from '~/logic/wallets/store/actions' import { fetchProvider } from '~/logic/wallets/store/actions'
import { getNetwork } from '~/config' import { getNetwork } from '~/config'
console.log(process.env)
const web3Connect = new Web3Connect.Core({ const web3Connect = new Web3Connect.Core({
network: getNetwork().toLowerCase(), network: getNetwork().toLowerCase(),
providerOptions: { providerOptions: {
walletconnect: { walletconnect: {
package: WalletConnectProvider, package: WalletConnectProvider,
options: { options: {
infuraId: process.env.INFURA_ID, infuraId: process.env.REACT_APP_INFURA_TOKEN,
}, },
}, },
portis: { portis: {
package: Portis, package: Portis,
options: { options: {
id: '852b763d-f28b-4463-80cb-846d7ec5806b', id: process.env.REACT_APP_PORTIS_ID,
}, },
}, },
fortmatic: { fortmatic: {
package: Fortmatic, package: Fortmatic,
options: { options: {
key: 'pk_test_43A53775AE976718', key: process.env.REACT_APP_FORTMATIC_KEY,
}, },
}, },
squarelink: { squarelink: {
package: Squarelink, // required package: Squarelink, // required
options: { options: {
id: 'dd56d364853963bbbe0f', // required id: process.env.REACT_APP_SQUARELINK_ID, // required
}, },
}, },
torus: { torus: {