diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml
index 50328da8d8..5941d94b29 100644
--- a/.do/deploy.template.yaml
+++ b/.do/deploy.template.yaml
@@ -1,25 +1,25 @@
spec:
alerts:
- - rule: DEPLOYMENT_FAILED
- - rule: DOMAIN_FAILED
+ - rule: DEPLOYMENT_FAILED
+ - rule: DOMAIN_FAILED
name: frontend-v2
services:
- - envs:
- - key: INFURA_PROJECT_ID
- scope: RUN_AND_BUILD_TIME
- - key: ALCHEMY_KEY
- scope: RUN_AND_BUILD_TIME
- - key: BLOCKNATIVE_DAPP_ID
- scope: RUN_AND_BUILD_TIME
- http_port: 80
- image:
- registry_type: DOCKER_HUB
- registry: balancerfi
- repository: frontend-v2
- tag: latest
- instance_count: 1
- instance_size_slug: basic-xxs
- name: frontend-v2
- routes:
- - path: /
- source_dir: /
\ No newline at end of file
+ - envs:
+ - key: INFURA_PROJECT_ID
+ scope: RUN_AND_BUILD_TIME
+ - key: ALCHEMY_KEY
+ scope: RUN_AND_BUILD_TIME
+ - key: BLOCKNATIVE_DAPP_ID
+ scope: RUN_AND_BUILD_TIME
+ http_port: 80
+ image:
+ registry_type: DOCKER_HUB
+ registry: balancerfi
+ repository: frontend-v2
+ tag: latest
+ instance_count: 1
+ instance_size_slug: basic-xxs
+ name: frontend-v2
+ routes:
+ - path: /
+ source_dir: /
diff --git a/.eslintrc.js b/.eslintrc.js
index f18cdaa1a7..c708185b6f 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -2,7 +2,7 @@ module.exports = {
root: true,
env: {
- node: true
+ node: true,
},
globals: {
@@ -10,23 +10,21 @@ module.exports = {
withDefaults: true,
defineProps: true,
defineEmits: true,
- defineExpose: true
+ defineExpose: true,
},
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/typescript/recommended',
- '@vue/prettier',
- '@vue/prettier/@typescript-eslint',
- '@vue/typescript'
+ '@vue/typescript',
],
plugins: ['simple-import-sort'],
parserOptions: {
ecmaVersion: 2020,
- parser: '@typescript-eslint/parser'
+ parser: '@typescript-eslint/parser',
},
rules: {
@@ -41,18 +39,18 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'simple-import-sort/imports': 'warn',
- 'simple-import-sort/exports': 'warn'
+ 'simple-import-sort/exports': 'warn',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
- '**/tests/unit/**/*.spec.{j,t}s?(x)'
+ '**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
- jest: true
- }
- }
- ]
+ jest: true,
+ },
+ },
+ ],
};
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
index 87600d5ce1..a6d9507fe1 100644
--- a/.github/CODE_OF_CONDUCT.md
+++ b/.github/CODE_OF_CONDUCT.md
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
+- The use of sexualized language or imagery and unwelcome sexual attention or advances
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic address, without explicit permission
+- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 88fa5c83b8..c83bbcf8b1 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -2,30 +2,30 @@
You should usually open an issue in the following situations:
-* Report an error you can’t solve yourself
-* Discuss a high-level topic or idea (for example, community, vision or policies)
-* Propose a new feature or other project idea
+- Report an error you can’t solve yourself
+- Discuss a high-level topic or idea (for example, community, vision or policies)
+- Propose a new feature or other project idea
Tips for communicating on issues:
-* **If you see an open issue that you want to tackle,** comment on the issue to let people know you’re on it. That way, people are less likely to duplicate your work.
-* **If an issue was opened a while ago,** it’s possible that it’s being addressed somewhere else, or has already been resolved, so comment to ask for confirmation before starting work.
-* **If you opened an issue, but figured out the answer later on your own,** comment on the issue to let people know, then close the issue. Even documenting that outcome is a contribution to the project.
+- **If you see an open issue that you want to tackle,** comment on the issue to let people know you’re on it. That way, people are less likely to duplicate your work.
+- **If an issue was opened a while ago,** it’s possible that it’s being addressed somewhere else, or has already been resolved, so comment to ask for confirmation before starting work.
+- **If you opened an issue, but figured out the answer later on your own,** comment on the issue to let people know, then close the issue. Even documenting that outcome is a contribution to the project.
### Opening a pull request
You should usually open a pull request in the following situations:
-* Submit trivial fixes (for example, a typo, a broken link or an obvious error)
-* Start work on a contribution that was already asked for, or that you’ve already discussed, in an issue
+- Submit trivial fixes (for example, a typo, a broken link or an obvious error)
+- Start work on a contribution that was already asked for, or that you’ve already discussed, in an issue
A pull request doesn’t have to represent finished work. It’s usually better to open a pull request early on, so others can watch or give feedback on your progress. Just mark it as a “WIP” (Work in Progress) in the subject line. You can always add more commits later.
If the project is on GitHub, here’s how to submit a pull request:
-* **Fork the repository** and clone it locally. Connect your local to the original repository by adding it as a remote. Pull in changes from this repository often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely.
-* **Create a branch** for your edits.
-* **Reference any relevant issues** or supporting documentation in your PR (for example, “Closes #37.”)
-* **Include screenshots of the before and after** if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
-* **Test your changes!** Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
-* **Contribute in the style of the project** to the best of your abilities. This may mean using indents, semi-colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
+- **Fork the repository** and clone it locally. Connect your local to the original repository by adding it as a remote. Pull in changes from this repository often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely.
+- **Create a branch** for your edits.
+- **Reference any relevant issues** or supporting documentation in your PR (for example, “Closes #37.”)
+- **Include screenshots of the before and after** if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
+- **Test your changes!** Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes don’t break the existing project.
+- **Contribute in the style of the project** to the best of your abilities. This may mean using indents, semi-colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index dd84ea7824..b5c68e55be 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
-
---
**Describe the bug**
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
+
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- - OS: [e.g. iOS]
- - Browser [e.g. chrome, safari]
- - Version [e.g. 22]
+
+- OS: [e.g. iOS]
+- Browser [e.g. chrome, safari]
+- Version [e.g. 22]
**Smartphone (please complete the following information):**
- - Device: [e.g. iPhone6]
- - OS: [e.g. iOS8.1]
- - Browser [e.g. stock browser, safari]
- - Version [e.g. 22]
+
+- Device: [e.g. iPhone6]
+- OS: [e.g. iOS8.1]
+- Browser [e.g. stock browser, safari]
+- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md
index 48d5f81fa4..96a47352ab 100644
--- a/.github/ISSUE_TEMPLATE/custom.md
+++ b/.github/ISSUE_TEMPLATE/custom.md
@@ -4,7 +4,4 @@ about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
-
---
-
-
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index bbcbbe7d61..2f28cead03 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
-
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml
index 6b5d0f5dd2..dd4228b09b 100644
--- a/.github/workflows/cache.yml
+++ b/.github/workflows/cache.yml
@@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest
needs: wait-for-vercel-deployment
steps:
- - name: Purge cache
- uses: jakejarvis/cloudflare-purge-action@master
- env:
- # Zone is required by both authentication methods
- CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
- CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
\ No newline at end of file
+ - name: Purge cache
+ uses: jakejarvis/cloudflare-purge-action@master
+ env:
+ # Zone is required by both authentication methods
+ CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
+ CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 795c1b9f80..71df6b2e3c 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -11,68 +11,70 @@ jobs:
Version:
runs-on: ubuntu-latest
steps:
- - name: Checkout repo
- uses: actions/checkout@v2
- - name: Use Node.js
- uses: actions/setup-node@v1
- with:
- node-version: '14.x'
- - name: Get package.json version
- run: echo PACKAGE_VERSION=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV
- - name: Get package-lock.json version
- run: echo PACKAGE_LOCK_VERSION=$(node -p -e "require('./package-lock.json').version") >> $GITHUB_ENV
- - name: Check lockfile sync
- if: env.PACKAGE_VERSION != env.PACKAGE_LOCK_VERSION
- run: |
- echo "package-lock.json out of sync"
- exit 1
- - name: Check if version has been updated
- id: check
- uses: EndBug/version-check@v2
- with:
- diff-search: true
- - name: Log when changed
- if: steps.check.outputs.changed == 'true'
- run: 'echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
- - name: Fail if version not updated and PR base is master
- if: steps.check.outputs.changed == 'false' && github.event.pull_request.base.ref == 'master'
- run: exit 1
+ - name: Checkout repo
+ uses: actions/checkout@v2
+ - name: Use Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Get package.json version
+ run: echo PACKAGE_VERSION=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV
+ - name: Get package-lock.json version
+ run: echo PACKAGE_LOCK_VERSION=$(node -p -e "require('./package-lock.json').version") >> $GITHUB_ENV
+ - name: Check lockfile sync
+ if: env.PACKAGE_VERSION != env.PACKAGE_LOCK_VERSION
+ run: |
+ echo "package-lock.json out of sync"
+ exit 1
+ - name: Check if version has been updated
+ id: check
+ uses: EndBug/version-check@v2
+ with:
+ diff-search: true
+ - name: Log when changed
+ if: steps.check.outputs.changed == 'true'
+ run: 'echo "Version change found in commit ${{ steps.check.outputs.commit }}! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
+ - name: Fail if version not updated and PR base is master
+ if: steps.check.outputs.changed == 'false' && github.event.pull_request.base.ref == 'master'
+ run: exit 1
Build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Use Node.js
- uses: actions/setup-node@v1
- with:
- node-version: '14.x'
- - name: Install deps
- run: npm install -g npm@7 && npm ci
- - name: Run build
- run: npm run build
+ - uses: actions/checkout@v2
+ - name: Use Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Install deps
+ run: npm install -g npm@7 && npm ci
+ - name: Run build
+ run: npm run build
Lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Use Node.js
- uses: actions/setup-node@v1
- with:
- node-version: '14.x'
- - name: Install deps
- run: npm install -g npm@7 && npm ci
- - name: Run lint
- run: npm run lint
-
+ - uses: actions/checkout@v2
+ - name: Use Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Install deps
+ run: npm install -g npm@7 && npm ci
+ - name: Run lint
+ run: npm run lint
+ - name: Run prettier
+ run: npm run prettier
+
Test:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Use Node.js
- uses: actions/setup-node@v1
- with:
- node-version: '14.x'
- - name: Install deps
- run: npm install -g npm@7 && npm ci
- - name: Run tests
- run: npm run test:unit
+ - uses: actions/checkout@v2
+ - name: Use Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: '14.x'
+ - name: Install deps
+ run: npm install -g npm@7 && npm ci
+ - name: Run tests
+ run: npm run test:unit
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 40e6e533fb..49d6b6c6b5 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -12,21 +12,21 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v2
-
+
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
+
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.1.0
-
+
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: 'Dockerfile'
push: true
- tags: balancerfi/frontend-v2:latest,balancerfi/frontend-v2:${{ steps.package-version.outputs.current-version}}
\ No newline at end of file
+ tags: balancerfi/frontend-v2:latest,balancerfi/frontend-v2:${{ steps.package-version.outputs.current-version}}
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 6d395b884f..e95257bd62 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
+npm run prettier:fix
npm run lint:fix
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000000..c0f64a8361
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,2 @@
+dist/
+build/
diff --git a/.prettierrc.js b/.prettierrc.js
index 7d93e18086..dd8e1aa20c 100644
--- a/.prettierrc.js
+++ b/.prettierrc.js
@@ -1,3 +1,4 @@
module.exports = {
- singleQuote: true
+ singleQuote: true,
+ arrowParens: 'avoid',
};
diff --git a/.storybook/helpers/templates.ts b/.storybook/helpers/templates.ts
index 05d40e74e3..b71a4d2aef 100644
--- a/.storybook/helpers/templates.ts
+++ b/.storybook/helpers/templates.ts
@@ -4,5 +4,5 @@ export function generateTemplate(story: string): string {