Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into fix-bulk-execute
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Jun 17, 2024
2 parents 960bc34 + ed75771 commit 985ac27
Show file tree
Hide file tree
Showing 410 changed files with 11,063 additions and 8,431 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,19 @@ inputs:

runs:
using: 'composite'

steps:
- name: Set environment variables
shell: bash
run: |
if [ "${{ inputs.prod }}" = "true" ]; then
echo "NEXT_PUBLIC_INFURA_TOKEN=${{ fromJSON(inputs.secrets).NEXT_PUBLIC_INFURA_TOKEN }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN=${{ fromJSON(inputs.secrets).NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN }}" >> $GITHUB_ENV
else
echo "NEXT_PUBLIC_INFURA_TOKEN=${{ fromJSON(inputs.secrets).NEXT_PUBLIC_INFURA_TOKEN_DEVSTAGING }}" >> $GITHUB_ENV
echo "NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN=${{ fromJSON(inputs.secrets).NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN_DEVSTAGING }}" >> $GITHUB_ENV
fi
- name: Build
shell: bash
run: yarn build
Expand All @@ -31,8 +43,6 @@ runs:
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID }}
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LATEST_AUTH: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LATEST_AUTH }}
NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LIVE_AUTH: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_GOOGLE_TAG_MANAGER_LIVE_AUTH }}
NEXT_PUBLIC_INFURA_TOKEN: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_INFURA_TOKEN }}
NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN }}
NEXT_PUBLIC_SENTRY_DSN: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_SENTRY_DSN }}
NEXT_PUBLIC_TENDERLY_ORG_NAME: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_TENDERLY_ORG_NAME }}
NEXT_PUBLIC_TENDERLY_PROJECT_NAME: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_TENDERLY_PROJECT_NAME }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn

- uses: ./.github/workflows/build
with:
secrets: ${{ toJSON(secrets) }}
prod: ${{ github.ref == 'refs/heads/main' }}
if: startsWith(github.ref, 'refs/heads/main')

- uses: ./.github/workflows/build-storybook

Expand All @@ -53,14 +53,14 @@ jobs:

# Staging
- name: Deploy to the staging S3
if: github.ref == 'refs/heads/main'
if: startsWith(github.ref, 'refs/heads/main')
env:
BUCKET: s3://${{ secrets.AWS_STAGING_BUCKET_NAME }}/current
run: bash ./scripts/github/s3_upload.sh

# Dev
- name: Deploy to the dev S3
if: github.ref == 'refs/heads/dev'
if: startsWith(github.ref, 'refs/heads/dev')
env:
BUCKET: s3://${{ secrets.AWS_DEVELOPMENT_BUCKET_NAME }}
run: bash ./scripts/github/s3_upload.sh
Expand Down
30 changes: 7 additions & 23 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ jobs:
id-token: write

runs-on: ubuntu-latest

name: Deploy release

env:
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn

Expand All @@ -29,41 +32,22 @@ jobs:
- name: Create checksum
run: sha256sum "$ARCHIVE_NAME".tar.gz > ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt

- name: Upload archive
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}.tar.gz
asset_name: ${{ env.ARCHIVE_NAME }}.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload checksum
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
asset_name: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
asset_content_type: text/plain
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}

# Script to upload release files
- name: 'Upload release build files for production'
- name: Upload release build files for production
env:
BUCKET: s3://${{ secrets.AWS_STAGING_BUCKET_NAME }}/releases/${{ github.event.release.tag_name }}
CHECKSUM_FILE: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
run: bash ./scripts/github/s3_upload.sh

# Script to prepare production deployments
- run: bash ./scripts/github/prepare_production_deployment.sh
- name: Prepare deployment
run: bash ./scripts/github/prepare_production_deployment.sh
env:
PROD_DEPLOYMENT_HOOK_TOKEN: ${{ secrets.PROD_DEPLOYMENT_HOOK_TOKEN }}
PROD_DEPLOYMENT_HOOK_URL: ${{ secrets.PROD_DEPLOYMENT_HOOK_URL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-hp-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
containers: [1, 2, 3]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
containers: [1, 2, 3]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-safe-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
containers: [1, 2]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
containers: [1, 2, 3, 4, 5]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Lint'
name: Lint
on: [pull_request]

concurrency:
Expand All @@ -9,7 +9,7 @@ jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nextjs-bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/workflows/yarn
Expand All @@ -42,7 +42,6 @@ jobs:
run: bash ./scripts/github/download_bundle_analyser_artifact.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Compare with base branch bundle
if: success() && github.event.number
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/workflows/yarn

Expand Down
29 changes: 24 additions & 5 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,30 @@ const config: StorybookConfig = {
imageRule['exclude'] = /\.svg$/;
}

// Configure .svg files to be loaded with @svgr/webpack
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
config.module.rules.push({
test: /\.svg$/i,
issuer: { and: [/\.(js|ts|md)x?$/] },
use: [
{
loader: '@svgr/webpack',
options: {
prettier: false,
svgo: false,
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: { removeViewBox: false },
},
},
],
},
titleProp: true,
},
},
],
})

return config;
},
Expand Down
2 changes: 2 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { ThemeProvider, CssBaseline } from '@mui/material'
import { withThemeFromJSXProvider } from '@storybook/addon-themes'
import createSafeTheme from '../src/components/theme/safeTheme'

import '../src/styles/globals.css'

const preview: Preview = {
parameters: {
controls: {
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ Here's the list of all the environment variables:
| `NEXT_PUBLIC_FIREBASE_VAPID_KEY_PRODUCTION` | FCM vapid key on production
| `NEXT_PUBLIC_FIREBASE_OPTIONS_STAGING` | FCM `initializeApp` options on staging
| `NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING` | FCM vapid key on staging
| `NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_PRODUCTION` | Web3Auth and Google credentials (production)
| `NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_STAGING` | Web3Auth and Google credentials (staging)
| `NEXT_PUBLIC_SPINDL_SDK_KEY` | [Spindl](http://spindl.xyz) SDK key

If you don't provide some of the variables, the corresponding features will be disabled in the UI.
Expand Down
2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
mochaFile: 'reports/junit-[hash].xml',
},
retries: {
runMode: 2,
runMode: 3,
openMode: 0,
},
e2e: {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/happypath/sendfunds_connected_wallet.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { createSafes } from '../../support/api/utils_protocolkit'
import { contracts, abi_qtrust, abi_nft_pc2 } from '../../support/api/contracts'
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'

const safeBalanceEth = 305220000000000000n
const qtrustBanance = 93000000000000000025n
const safeBalanceEth = 305240000000000000n
const qtrustBanance = 99000000000000000025n
const transferAmount = '1'

const walletCredentials = JSON.parse(Cypress.env('CYPRESS_WALLET_CREDENTIALS'))
Expand Down
Loading

0 comments on commit 985ac27

Please sign in to comment.