Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into data-upload-download-…
Browse files Browse the repository at this point in the history
…apis
  • Loading branch information
bitdivine committed Aug 5, 2024
2 parents 568f671 + 1b847e7 commit bd92b41
Show file tree
Hide file tree
Showing 210 changed files with 6,496 additions and 1,631 deletions.
6 changes: 0 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ VITE_ETHERSCAN_API_KEY=
VITE_INFURA_API_KEY=
VITE_ALCHEMY_API_KEY=
VITE_WALLET_CONNECT_PROJECT_ID=
VITE_OISY_NAME="Oisy Wallet"
VITE_OISY_ONELINER="A multi-chain wallet powered by chainfusion"
VITE_OISY_DESCRIPTION="Oisy Wallet provides a seamless on-chain experience to manage your Ethereum and ICP assets. By leveraging native web technologies and advanced cryptography, it eliminates the need for browser extensions or mobile apps. And accessing the wallet is easy using passkeys on a computer or mobile device."
VITE_OISY_URL=https://oisy.com
VITE_OISY_ICON=https://oisy.com/favicons/icon-512x512.png
VITE_OISY_REPO_URL=https://github.com/dfinity/oisy-wallet
VITE_OISY_ALPHA_WARNING_URL="https://github.com/dfinity/oisy-wallet#status"
VITE_ERC20_ICP_SYMBOL=ckICP
VITE_ERC20_ICP_REPO_URL=https://github.com/dfinity/erc20-icp
VITE_COINGECKO_API_URL=https://api.coingecko.com/api/v3
Expand Down
6 changes: 0 additions & 6 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ VITE_ETHERSCAN_API_KEY=
VITE_INFURA_API_KEY=
VITE_ALCHEMY_API_KEY=
VITE_WALLET_CONNECT_PROJECT_ID=
VITE_OISY_NAME="Oisy Wallet"
VITE_OISY_ONELINER="A multi-chain wallet powered by chainfusion"
VITE_OISY_DESCRIPTION="Oisy Wallet provides a seamless on-chain experience to manage your Ethereum and ICP assets. By leveraging native web technologies and advanced cryptography, it eliminates the need for browser extensions or mobile apps. And accessing the wallet is easy using passkeys on a computer or mobile device."
VITE_OISY_URL=https://oisy.com
VITE_OISY_ICON=https://oisy.com/favicons/icon-512x512.png
VITE_OISY_REPO_URL=https://github.com/dfinity/oisy-wallet
VITE_OISY_ALPHA_WARNING_URL="https://github.com/dfinity/oisy-wallet#status"
VITE_ERC20_ICP_SYMBOL=ckICP
VITE_ERC20_ICP_REPO_URL=https://github.com/dfinity/erc20-icp
VITE_COINGECKO_API_URL=https://api.coingecko.com/api/v3
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
}
},
{
files: ['scripts/**/*.mjs'],
files: ['scripts/**/*.mjs', 'scripts/**/*.ts'],
rules: {
'no-console': 'off',
}
Expand All @@ -51,6 +51,8 @@ module.exports = {
'no-continue': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'no-delete-var': 'error',
'curly': 'error',
'arrow-body-style': ['warn', 'as-needed'],
},
globals: {
NodeJS: true
Expand Down
25 changes: 1 addition & 24 deletions .github/workflows/backend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,6 @@ on:

jobs:

format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-backend-tests-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Install cargo dependency sorter
run: cargo install cargo-sort@1.0.9
- name: Format
run: ./scripts/format.sh
- name: Check formatted
run: |
test -z "$(git status --porcelain)" || {
echo "FIX: Please run ./scripts/format.sh"
git diff
exit 1
}
lint:
runs-on: ubuntu-20.04
steps:
Expand All @@ -64,7 +41,7 @@ jobs:
run: ./scripts/lint.cargo-workspace-dependencies.sh

may-merge:
needs: [ 'format', 'lint', 'workspace-dependencies' ]
needs: [ 'lint', 'workspace-dependencies' ]
runs-on: ubuntu-20.04
steps:
- name: Cleared for merging
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/formatting-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Formatting Backend and Scripts

on:
pull_request:
paths:
- # Files formatted by ./scripts/format.cargo.sh
'**/Cargo.toml'
- # Files formatted by ./scripts/format.rust.sh
'**/*.rs'
- # Files formatted by ./scripts/format.sh.sh
# Note: shell scripts not ending in .sh are found with: scripts/format.sh.sh --list | grep -vE 'sh$'
'**/*.sh'
- 'docker/*'
- 'scripts/*'
- # This workflow
'.github/workflows/formatting-checks.yml'
workflow_dispatch:

jobs:

format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install shfmt
run: sudo snap install --classic shfmt
- name: Install binstall
run: |
BINSTALL_VERSION="1.8.0"
curl -L --proto '=https' --tlsv1.2 -sSf "https://github.com/cargo-bins/cargo-binstall/releases/download/v${BINSTALL_VERSION}/cargo-binstall-x86_64-unknown-linux-musl.tgz" | tar -xvzf - cargo-binstall
./cargo-binstall -y --force "cargo-binstall@$BINSTALL_VERSION"
rm cargo-binstall
- name: Install cargo dependency sorter
run: cargo binstall --no-confirm cargo-sort@1.0.9
- name: Format
run: ./scripts/format.sh
- name: Check formatted
run: |
test -z "$(git status --porcelain)" || {
echo "FIX: Please run ./scripts/format.sh"
git diff
exit 1
}
45 changes: 45 additions & 0 deletions .github/workflows/frontend-remove-unused-components.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Remove Unused Svelte Files

on:
schedule:
- cron: '30 3 * * MON'
workflow_dispatch:

jobs:
check-unused-files:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare

- name: Remove unused files
run: ./scripts/check.unused.sh --remove-files
continue-on-error: true

- name: Stage Changes
run: git add .

- name: Check for Changes
run: |
if ! git diff --cached --quiet; then
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
DELETED_FILES=$(git diff --cached --name-only)
echo "DELETED_FILES=${DELETED_FILES}" >> $GITHUB_ENV
fi
# This action creates a PR only if there are changes.
- name: Create Pull Request
if: env.CHANGES_DETECTED == 'true'
uses: ./.github/actions/create-pr
with:
token: ${{ secrets.GIX_CREATE_PR_PAT }}
branch: bot-frontend-remove-unused-svelte-files
title: 'chore(frontend): Remove Unused Svelte Files'
body: |
The following files were removed because they were not used in the project anymore:
```
${{ env.DELETED_FILES }}
```
14 changes: 4 additions & 10 deletions .github/workflows/update-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,13 @@ jobs:
cat ./rust-toolchain.toml
# If the rust-toolchain was updated, create a PR.
# This action creates a PR only if there are changes.
- name: Create Pull Request
if: ${{ steps.update.outputs.updated == '1' }}
uses: peter-evans/create-pull-request@v6
uses: ./.github/actions/create-pr
with:
token: ${{ secrets.GIX_CREATE_PR_PAT }}
base: main
commit-message: 'build: Update Rust version'
committer: GitHub <noreply@github.com>
author: gix-bot <gix-bot@users.noreply.github.com>
branch: bot-rust-update
delete-branch: true
add-paths: ./rust-toolchain.toml
title: 'build: Update Rust version'
title: 'build(backend): Update Rust version'
body: |
A new Rust version available.
A new Rust version available.
Loading

0 comments on commit bd92b41

Please sign in to comment.