diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 1b816e6b7f..0d46163984 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -9,6 +9,9 @@ permissions: id-token: write contents: read +env: + REACT_APP_INCLUDE_TESTNET: true + jobs: build-and-deploy: uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index ba18255f0e..6a1946f1fb 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -9,6 +9,9 @@ permissions: id-token: write contents: read +env: + REACT_APP_INCLUDE_TESTNET: false + jobs: build-and-deploy: uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master diff --git a/.github/workflows/stage.yaml b/.github/workflows/stage.yaml index d5a564c578..534b82997c 100644 --- a/.github/workflows/stage.yaml +++ b/.github/workflows/stage.yaml @@ -10,6 +10,9 @@ permissions: id-token: write contents: read +env: + REACT_APP_INCLUDE_TESTNET: true + jobs: build-and-deploy: uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..0bcb6e2d27 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2023-05-17 + +### Added + +- Google Tag Manager script +- Cere Logo and Icon +- Cere Mainnet and Testnet configurations +- Cere Network favicons + +### Changed + +- Refactored testnet inclusion condition in build-and-deploy job +- Updated branches for Stage and Prod +- Updated information about Inflation +- Fixed HTML page formatting, ChangeNominations, and CERE_URL +- Updated README.md, prod.yaml, Favicons, units, and URI Prefix +- Adjusted constants and networks for Cere +- Updated default Network and active networks fields + +### Removed + +- Binance fetch +- maxNominatorsCount from TotalNominations +- Feedback and Community pages +- Settings Modal +- UseInflation hook +- Removed auctionCounter field diff --git a/README.md b/README.md index 7aba0a7f95..5ca3d82345 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,9 @@ REACT_APP_ORGANISATION="© Parity Technologies" # provide a privacy policy url in the network bar REACT_APP_PRIVACY_URL=https://www.parity.io/privacy/ + +# include the testnet configuration +REACT_APP_INCLUDE_TESTNET=true ``` ## Config Files There are some ad-hoc files defining app configuration where needed. These just provide a means of bootstrapping app data, and further abstraction could be explored in the future. diff --git a/package.json b/package.json index 396e939ac7..d02f771c13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polkadot-staking-dashboard", - "version": "0.1.0", + "version": "1.0.0", "license": "apache-2.0", "private": false, "dependencies": { diff --git a/src/config/networks.ts b/src/config/networks.ts index 0b85db349c..8ebb8134e0 100644 --- a/src/config/networks.ts +++ b/src/config/networks.ts @@ -53,10 +53,14 @@ const cereTestnet = { endpoint: 'wss://archive.testnet.cere.network/ws', }; +// Determine if the testnet should be included based on the REACT_APP_INCLUDE_TESTNET environment variable +// By default, includeTestnet is true or undefined unless REACT_APP_INCLUDE_TESTNET is explicitly set to 'false' +const includeTestnet = process.env.REACT_APP_INCLUDE_TESTNET !== 'false'; + /* * Network Configuration */ export const NETWORKS: Networks = { cereMainnet, - cereTestnet, + ...(includeTestnet ? { cereTestnet } : {}), };