Skip to content

Commit

Permalink
Merge pull request #5577 from LiskHQ/5576-fix-mapbox-token
Browse files Browse the repository at this point in the history
Fix Mapbox token compromise
  • Loading branch information
shuse2 authored Mar 27, 2024
2 parents 1b5d889 + afb9399 commit e0e48d2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_MAPBOX_ACCESS_TOKEN=
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"LISK_ENABLE_DEV_TOOL": true,
"PRODUCTION": true,
"LISK_DOMAIN": true,
"REACT_APP_DEFAULT_NETWORK": true
"REACT_APP_DEFAULT_NETWORK": true,
"REACT_APP_MAPBOX_ACCESS_TOKEN": true,
},
"env": {
"es2020": true,
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ app/app.js
blockchain_explorer.db.gz
reports
.history
.env
.env.*
yarn-error.log
*.tgz

Expand Down
1 change: 1 addition & 0 deletions setup/config/webpack.config.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const config = {
VERSION: `"${bundleVersion}"`,
LISK_DOMAIN: '"https://lisk.com"',
REACT_APP_DEFAULT_NETWORK: `"${process.env.DEFAULT_NETWORK}"`,
REACT_APP_MAPBOX_ACCESS_TOKEN: `"${process.env.REACT_APP_MAPBOX_ACCESS_TOKEN}"`,
}),
new StyleLintPlugin({
context: `${path.resolve(__dirname, '../../src')}`,
Expand Down
1 change: 1 addition & 0 deletions setup/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ module.exports = {
TEST: true,
VERSION: '',
REACT_APP_DEFAULT_NETWORK: 'undefined',
REACT_APP_MAPBOX_ACCESS_TOKEN: 'pk.eyJ1Ij',
LISK_ENABLE_DEV_TOOL: false,
LISK_DOMAIN: 'https://lisk.com',
},
Expand Down
2 changes: 1 addition & 1 deletion src/modules/network/components/map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const getAttributionLinks = () => {

const getTiles = () =>
L.tileLayer(
'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFudWxpZ2h0Y3VydmUiLCJhIjoiY2xodWVjYW52MGM0cDNobzYzZGRkOGU0dyJ9.aOMEZq0mbD6C-DgwU_ib_A',
`https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=${REACT_APP_MAPBOX_ACCESS_TOKEN}`,
{
id: 'mapbox/streets-v11',
tileSize: 512,
Expand Down

0 comments on commit e0e48d2

Please sign in to comment.