Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Fix: set default dev chainId to Goerli (#4087)
Browse files Browse the repository at this point in the history
* Fix: set default dev chainId to Goerli

* Update readme

* Fix tests

* Update GH action

* Rm PR deployment action
  • Loading branch information
katspaugh authored Oct 10, 2022
1 parent 60a4dd6 commit 1e79cab
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 69 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Deploy

# Run on pushes to main or PRs
on:
# Pull request hook without any config. Launches for every pull request
pull_request:
# Launches for pushes to main or dev
push:
branches:
Expand Down Expand Up @@ -67,11 +65,6 @@ jobs:
rm -rf .yarncache
yarn cache clean
# Set dev flag (for PR deployments)
- name: Set PR flag
run: echo "REACT_APP_ENV=dev" >> $GITHUB_ENV
if: github.ref != 'refs/heads/main'

# Set production flag on staging
- name: Set production flag for staging
run: echo "REACT_APP_ENV=dev" >> $GITHUB_ENV
Expand Down Expand Up @@ -106,27 +99,6 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

# Script to deploy Pull Requests
- run: bash ./scripts/github/deploy_pull_request.sh
if: success() && github.event.number
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
PR_NUMBER: ${{ github.event.number }}
REVIEW_BUCKET_NAME: ${{ secrets.AWS_REVIEW_BUCKET_NAME }}

- name: 'PRaul: Comment PR with app URLs'
uses: mshick/add-pr-comment@v1
with:
message: |
## Deployment links
:white_circle: [Mainnet](${{ env.REVIEW_FEATURE_URL }}/eth)     :purple_circle: [Polygon](${{ env.REVIEW_FEATURE_URL }}/matic)     :orange_circle: [Rinkeby](${{ env.REVIEW_FEATURE_URL }}/rin)
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
if: success() && github.event.number
env:
REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--safereact.review-safe.gnosisdev.com/app

# Script to deploy to the dev environment
- name: 'Deploy to S3: Dev'
if: github.ref == 'refs/heads/dev'
Expand Down Expand Up @@ -165,19 +137,3 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
e2e:
runs-on: ubuntu-20.04
name: E2E on Chrome
if: github.event.number
needs: deploy
steps:
- uses: actions/checkout@v2
- uses: cypress-io/github-action@v2
with:
spec: cypress/integration/smoke/*.spec.js
browser: chrome
record: false
config: baseUrl=https://pr${{ github.event.number }}--safereact.review-safe.gnosisdev.com/app/
env:
CYPRESS_ENV: ${{ env.REACT_APP_ENV}}
CYPRESS_MNEMONIC: ${{secrets.CYPRESS_MNEMONIC}}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Safe web UI
# ‼️ This repository is in maintenance mode and will be eventually archived.
# Please use [safe-global/web-core](https://github.com/safe-global/web-core)

# Legacy Safe web UI

![license](https://img.shields.io/github/license/gnosis/safe-react)
![build](https://img.shields.io/github/workflow/status/gnosis/safe-react/Deploy%20to%20Mainnet%20network/main)
Expand Down
22 changes: 0 additions & 22 deletions scripts/github/deploy_pull_request.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/update-mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo 'Updating Jest mocks...'

# Fetch config
config=$(curl -s 'https://safe-client.staging.gnosisdev.com/v1/chains/')
config=$(curl -s 'https://safe-client.staging.5afe.dev/v1/chains/')

# Pretty-print the JSON
node -p "JSON.stringify($config, null, 2)" > src/logic/safe/utils/mocks/remoteConfig.json
1 change: 1 addition & 0 deletions src/config/chain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const CHAIN_ID: Record<ChainName, ChainId> = {
UNKNOWN: '0',
ETHEREUM: '1',
RINKEBY: '4',
GOERLI: '5',
VOLTA: '73799',
}

Expand Down
3 changes: 2 additions & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export const APP_ENV = process.env.REACT_APP_ENV
export const NODE_ENV = process.env.NODE_ENV
export const IS_PRODUCTION = APP_ENV === 'production'
export const DEFAULT_CHAIN_ID =
process.env.REACT_APP_DEFAULT_CHAIN_ID || (IS_PRODUCTION ? CHAIN_ID.ETHEREUM : CHAIN_ID.RINKEBY)
process.env.REACT_APP_DEFAULT_CHAIN_ID ||
(IS_PRODUCTION ? CHAIN_ID.ETHEREUM : NODE_ENV === 'test' ? CHAIN_ID.RINKEBY : CHAIN_ID.GOERLI)
export const PUBLIC_URL = process.env.PUBLIC_URL
export const TX_SERVICE_VERSION = '1'
export const INTERCOM_ID = IS_PRODUCTION ? process.env.REACT_APP_INTERCOM_ID : 'plssl1fl'
Expand Down

0 comments on commit 1e79cab

Please sign in to comment.