on master help sign in
Rename misleading environment variable.

REACT_APP_INFURA_KEY is not actually a key, and certainly not a secret key, but the public Infura endpoint for the app. Naming it 'KEY' can give the impression that we're leaking secret data in the application, but we're not.

commit937f13857392d1d5f2f22714b4c678b8162fb43e authorJared Tobin <jared@jtobin.io> dateSat 4 May 2019, 08:28 (8 years ago) parent048492c
3 files changed+4−4
.env+1−1 src/bridge/Bridge.js+1−1 src/bridge/views/Network.js+2−2
.env+1−1
@@ -1,2 +1,2 @@
1−REACT_APP_INFURA_KEY='b7d2af9f01534031ba773374f766ef65'
1+REACT_APP_INFURA_ENDPOINT='b7d2af9f01534031ba773374f766ef65'
22
src/bridge/Bridge.js+1−1
@@ -18,7 +18,7 @@ import { BRIDGE_ERROR } from './lib/error'
1818const initWeb3 = (networkType) => {
1919 if (networkType === NETWORK_NAMES.MAINNET) {
2020 const endpoint =
21− `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`
21+ `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_ENDPOINT}`
2222
2323 const provider = new Web3.providers.HttpProvider(endpoint)
2424 const web3 = new Web3(provider)
src/bridge/views/Network.js+2−2
@@ -36,7 +36,7 @@ class Network extends React.Component {
3636 setNetworkType(network)
3737
3838 const endpoint =
39− `https://ropsten.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`
39+ `https://ropsten.infura.io/v3/${process.env.REACT_APP_INFURA_ENDPOINT}`
4040
4141 const provider = new Web3.providers.HttpProvider(endpoint)
4242 const web3 = new Web3(provider)
@@ -49,7 +49,7 @@ class Network extends React.Component {
4949 setNetworkType(network)
5050
5151 const endpoint =
52− `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`
52+ `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_ENDPOINT}`
5353
5454 const provider = new Web3.providers.HttpProvider(endpoint)
5555 const web3 = new Web3(provider)