Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from gnosis/dev
Browse files Browse the repository at this point in the history
pull latest into dev
  • Loading branch information
InoMurko authored Mar 21, 2022
2 parents 15d2afa + bdfa572 commit 629bb96
Show file tree
Hide file tree
Showing 309 changed files with 7,191 additions and 4,017 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.DS_Store
**/.idea
**/dist
*Dockerfile*
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Define environment
REACT_APP_ENV=

# For all environments
REACT_APP_GATEWAY_URL=
REACT_APP_GOOGLE_ANALYTICS=
REACT_APP_INFURA_TOKEN=
REACT_APP_IPFS_GATEWAY=https://ipfs.io/ipfs
REACT_APP_SENTRY_DSN=
REACT_APP_SAFE_APPS_RPC_INFURA_TOKEN=
REACT_APP_BEAMER_ID=

# For production environments
REACT_APP_INTERCOM_ID=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
path-to-signatures: 'signatures/version1/cla.json'
path-to-cla-document: 'https://github.com/gnosis/safe-react/blob/main/GNOSISCLA.md'
branch: 'cla-signatures'
allowlist: lukasschor,mikheevm,rmeissner,germartinez,davidalbela,Uxio0,dasanra,francovenica,tschubotz,luarx,giacomolicari,gnosis-info,bot*,katspaugh,DaniSomoza,iamacook,yagopv,usame-algan,InoMurko
allowlist: lukasschor,mikheevm,rmeissner,germartinez,davidalbela,Uxio0,dasanra,francovenica,tschubotz,luarx,giacomolicari,gnosis-info,bot*,katspaugh,DaniSomoza,iamacook,yagopv,usame-algan
empty-commit-flag: false
blockchain-storage-flag: false
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
schedule:
- cron: '37 9 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
37 changes: 0 additions & 37 deletions .github/workflows/comment-on-e2e-success.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
REACT_APP_SAFE_APPS_RPC_INFURA_TOKEN: ${{ secrets.REACT_APP_SAFE_APPS_RPC_INFURA_TOKEN }}
REACT_APP_PORTIS_ID: ${{ secrets.REACT_APP_PORTIS_ID }}
REACT_APP_INTERCOM_ID: ${{ secrets.REACT_APP_INTERCOM_ID }}
REACT_APP_BEAMER_ID: ${{ secrets.REACT_APP_BEAMER_ID }}
REACT_APP_IPFS_GATEWAY: ${{ secrets.REACT_APP_IPFS_GATEWAY }}

- name: Configure AWS credentials
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/mint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Mint PR NFT

on:
workflow_dispatch:
inputs:
prNumber:
description: 'PR number'
required: true

jobs:
mint:
environment: Manual
name: Mint
runs-on: ubuntu-latest
steps:
- name: Mint
uses: web3actions/tx@d3833db41e58cb4e7f329027ad30211a22e1c5e5
with:
rpc-node: ${{ secrets.RPC_NODE}}
wallet-key: ${{ secrets.WALLET_KEY }}
contract: ${{ secrets.CONTRACT_ADDRESS }}
function: "mint(address _to, uint256 _tokenId, string _uri)"
inputs: '[ "${{ secrets.WALLET_ADDRESS }}", ${{ github.event.inputs.prNumber }}, "https://github.com/gnosis/safe-react/pull/${{ github.event.inputs.prNumber }}" ]'
value: "0"

- name: Set success comment
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.inputs.prNumber }}
body: |
[<img alt="GitMint NFT preview" width="200" src="https://gitsvg.katspaugh.workers.dev/?svg=1&url=https://github.com/gnosis/safe-react/pull/${{ github.event.inputs.prNumber }}" />](https://blockscout.com/xdai/mainnet/token/${{ secrets.CONTRACT_ADDRESS }}/instance/${{ github.event.inputs.prNumber }})
Thank you for your contribution! Please, let us know your Ethereum address to receive [this NFT on Gnosis Chain](https://epor.io/tokens/${{ secrets.CONTRACT_ADDRESS }}/${{ github.event.inputs.prNumber }}?network=xDai).
Cheers! 🏆
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Please see the [transaction](docs/transactions.md) notes for more information ab

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [Deployment](#deployment) for notes on how to deploy the project on a live system.
These instructions will help you get a copy of the project up and running on your local machine for development and testing purposes. See [Deployment](#deployment) for notes on how to deploy the project on a live system.

### Prerequisites

Expand Down Expand Up @@ -62,12 +62,24 @@ Install dependencies for the project:
yarn install
```

To launch the app with all configured chains:
To launch the dev version of the app locally:

```
yarn start
```

Alternatively, to run the production version of the app:

```
yarn build
mv build app
python -m SimpleHTTPServer 3000
```

And open http://localhost:3000/app in the browser.

### Docker

If you prefer to use Docker:

```
Expand All @@ -76,7 +88,7 @@ docker-compose build && docker-compose up

### Building

Te get a complete bundle using the current configuration use:
To get a complete bundle using the current configuration use:

```
yarn build
Expand Down
18 changes: 18 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
server {
listen 80;

location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
index index.html index.htm;
}

location ^~ /app {
alias /usr/share/nginx/html;
try_files $uri /index.html;
index index.html index.htm;
}


include /etc/nginx/extra-conf.d/*.conf;
}
18 changes: 16 additions & 2 deletions docs/release-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,24 @@ git log origin/main..origin/dev --pretty=format:'* %s'
### QA
* The QA team do regression testing on this branch
* If issues are found, bugfixes are merged into this branch
* Once the QA is done, we push the branch to `main`
* `main` is automatically deployed to staging – some extra QA can be done there if needed
* Once the QA is done, proceed to the next step

### Tag & release
Wait for all the checks on GitHub to pass.
* Switch to the main branch and make sure it's up to date:
```
git checkout main
git fetch --all
git reset --hard origin/main
```
* Pull from the release branch:
```
git pull origin release/3.15.0
```
* Push to main:
```
git push origin main
```
* Create and push a new version tag :
```
git tag v3.15.0
Expand Down
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "safe-react",
"version": "3.18.0",
"version": "3.22.0",
"description": "Allowing crypto users manage funds in a safer way",
"website": "https://github.com/gnosis/safe-react#readme",
"bugs": {
Expand Down Expand Up @@ -84,12 +84,13 @@
},
"dependencies": {
"@ethersproject/hash": "^5.5.0",
"@gnosis.pm/safe-apps-sdk": "6.2.0",
"@gnosis.pm/safe-apps-sdk": "7.3.0",
"@gnosis.pm/safe-apps-sdk-v1": "npm:@gnosis.pm/safe-apps-sdk@0.4.2",
"@gnosis.pm/safe-core-sdk": "^1.3.0",
"@gnosis.pm/safe-core-sdk": "^2.0.0",
"@gnosis.pm/safe-deployments": "^1.8.0",
"@gnosis.pm/safe-react-components": "^0.9.0",
"@gnosis.pm/safe-react-gateway-sdk": "2.8.3",
"@gnosis.pm/safe-react-components": "^1.1.2",
"@gnosis.pm/safe-react-gateway-sdk": "^2.10.1",
"@gnosis.pm/safe-web3-lib": "^1.0.0",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.0",
"@material-ui/lab": "4.0.0-alpha.60",
Expand All @@ -100,7 +101,7 @@
"abi-decoder": "^2.4.0",
"axios": "0.21.4",
"bignumber.js": "9.0.1",
"bnc-onboard": "~1.35.3",
"bnc-onboard": "^1.37.3",
"classnames": "^2.2.6",
"currency-flags": "3.2.1",
"date-fns": "^2.20.2",
Expand Down Expand Up @@ -139,13 +140,14 @@
"reselect": "^4.0.0",
"semver": "^7.3.2",
"styled-components": "^5.3.0",
"web3": "1.6.0",
"web3-core": "^1.6.0",
"web3-eth-contract": "^1.6.0",
"web3-utils": "^1.6.0"
"ua-parser-js": "^1.0.2",
"web3": "1.7.0",
"web3-core": "^1.7.0",
"web3-eth-contract": "^1.7.0",
"web3-utils": "^1.7.0"
},
"devDependencies": {
"@gnosis.pm/safe-core-sdk-types": "^0.1.1",
"@gnosis.pm/safe-core-sdk-types": "1.0.0",
"@rescripts/cli": "^0.0.16",
"@sentry/cli": "^1.67.2",
"@storybook/addon-actions": "^6.3.8",
Expand All @@ -168,6 +170,7 @@
"@types/react-router-dom": "^5.1.9",
"@types/redux-actions": "^2.6.2",
"@types/styled-components": "^5.1.11",
"@types/ua-parser-js": "^0.7.36",
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"concurrently": "^6.0.0",
Expand Down
29 changes: 29 additions & 0 deletions prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:14 as react-build-step

# Grab needed environment variables from .env.example
ENV REACT_APP_ENV=production

RUN apt-get update \
&& apt-get install -y libusb-1.0-0 libusb-1.0-0-dev libudev-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY package.json yarn.lock .
COPY src/logic/contracts/artifacts ./src/logic/contracts/artifacts

RUN yarn install

COPY . .

RUN yarn build

# Deploy the build
FROM nginx:1-alpine

COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=react-build-step /app/build /usr/share/nginx/html/

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
8 changes: 7 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<base href="%PUBLIC_URL%/" />
<title>Gnosis Safe</title>

<meta property="og:title" content="Gnosis Safe" />
<meta property="og:description" content="Gnosis Safe is the most trusted platform to manage digital assets on Ethereum" />
<meta property="og:image" content="%PUBLIC_URL%/resources/og-image.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="%PUBLIC_URL%/resources/og-image.png" />
</head>
<style>
#safe-preloader-animation {
Expand All @@ -33,7 +39,7 @@
}
</style>
<body>
<img id="safe-preloader-animation" src="./resources/safe.png" />
<img id="safe-preloader-animation" src="./resources/logo.svg" />
<div id="root" style="overflow: hidden"></div>
</body>
</html>
3 changes: 3 additions & 0 deletions public/resources/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/resources/logo_120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/resources/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/resources/safe.png
Binary file not shown.
Loading

0 comments on commit 629bb96

Please sign in to comment.