Skip to content

Commit

Permalink
v7.3.1
Browse files Browse the repository at this point in the history
v7.3.1
  • Loading branch information
platschi authored Jun 28, 2023
2 parents 0d58c0d + a39f47b commit 3df297a
Show file tree
Hide file tree
Showing 53 changed files with 1,897 additions and 1,783 deletions.
8 changes: 0 additions & 8 deletions .env.local.example

This file was deleted.

4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**/node_modules/*
**/out/*
**/.next/*
**/.next/*
**/charting_library/*
dist
92 changes: 1 addition & 91 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": ["react-app", "plugin:@next/next/recommended"],
"extends": ["react-app"],
"plugins": ["prettier"],
"rules": {
"@next/next/no-html-link-for-pages": ["error", "packages/app/src/pages/"],
"react/react-in-jsx-scope": "off",
"prettier/prettier": "error",
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
Expand All @@ -19,7 +18,6 @@
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/alt-text": "off",
"import/no-anonymous-default-export": "off",
"@next/next/no-img-element": "off",
"no-console": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
Expand All @@ -29,94 +27,6 @@
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"import/order": [
"warn",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling"
],
"newlines-between": "always",
"pathGroups": [
{
"pattern": "assets/**",
"group": "internal"
},
{
"pattern": "components/**",
"group": "internal"
},
{
"pattern": "constants/**",
"group": "internal"
},
{
"pattern": "containers/**",
"group": "internal"
},
{
"pattern": "contexts/**",
"group": "internal"
},
{
"pattern": "hooks/**",
"group": "internal"
},
{
"pattern": "pages/**",
"group": "internal"
},
{
"pattern": "queries/**",
"group": "internal"
},
{
"pattern": "sdk/**",
"group": "internal"
},
{
"pattern": "sections/**",
"group": "internal"
},
{
"pattern": "store/**",
"group": "internal"
},
{
"pattern": "state/**",
"group": "internal"
},
{
"pattern": "styles/**",
"group": "internal"
},
{
"pattern": "translations/**",
"group": "internal"
},
{
"pattern": "utils/**",
"group": "internal"
},
{
"pattern": "lib/**",
"group": "internal"
},
{
"pattern": "testing/**",
"group": "internal"
}
],
"pathGroupsExcludedImportTypes": []
}
]
}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:

- name: Run lighthouse
run: |
lhci autorun --config=tests/lighthouse/lhci-desktop.conf.js
lhci autorun --config=tests/lighthouse/lhci-mobile.conf.js
lhci autorun --config=packages/app/testing/lighthouse/lhci-desktop.conf.js
lhci autorun --config=packages/app/testing/lighthouse/lhci-mobile.conf.js
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_URL: ${{ github.event.inputs.url }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
.vscode/
1 change: 0 additions & 1 deletion .gitsigners

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

26 changes: 0 additions & 26 deletions CHANGELOG.md

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Kwenta is a dApp enabling derivatives trading with infinite liquidity - powered by the Synthetix protocol. We're community driven and welcome all contributions. We aim to provide a constructive, respectful and fun environment for collaboration.

If you wish to help out, please first join the **Kwenta devDAO** on our [Discord](https://discord.gg/kwentaio) `#community-dev` channel. For more information, see [devDAO](#devdao) below.
If you wish to help out, please first join the **Kwenta devDAO** on our [Discord](https://discord.gg/kwentaio) `#devdao-chat` channel. For more information, see [devDAO](#devdao) below.

This guide is geared towards beginners. If you're an open-source veteran feel free to just skim this document and get straight into crushing issues.

Expand All @@ -27,7 +27,7 @@ Regardless of the reason, the process to begin contributing is very much the sam

The devDAO has been created specifically to foster open community development and reward community developers. It is an essential piece in our collaborative effort to fully decentralize Kwenta.

Be welcome to join the Kwenta devDAO on our [Discord](https://discord.gg/kwentaio) `#community-dev` channel.
Be welcome to join the Kwenta devDAO on our [Discord](https://discord.gg/kwentaio) `#devdao-chat` channel.

This is where discussions take place, new tickets will be announced by the community PM and assigned to the respective community members and roles on a first come, first served base.

Expand All @@ -37,7 +37,7 @@ There are different roles depending on the severity of a ticket. As a new commun

We recommend the following work-flow for contributors:

1. **Find an open ticket** to work on in our Discord, either because it's interesting or suitable to your skill set. Use the `#community-dev channel` to communicate your intentions and ask questions.
1. **Find an open ticket** to work on in our Discord, either because it's interesting or suitable to your skill set. Use the `#devdao-chat channel` to communicate your intentions and ask questions.
2. **Work in a feature branch** of your personal fork (github.com/YOUR_NAME/kwenta) of the main repository (github.com/kwenta/kwenta).
3. Once you feel you have addressed the issue, **create a pull-request** to merge your changes into the main repository. In case of any doubts, don't hesitate to contact the community PM or ask away in the channel.
4. Wait for a CC or auditor to **review your changes** to ensure the issue is addressed satisfactorily. Optionally, mention your PR on [Discord](https://discord.gg/kwentaio).
Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ Kwenta welcomes contributors. Regardless of the time you have available, everyon
### Install dependencies

```bash
npm install --legacy-peer-deps
pnpm install
```

### Set up environment variables

Copy the `.env.local.example` file in this directory to `.env.local` (which will be ignored by Git):
Copy the `.env.local.example` file in the `packages/app` directory to `.env.local` (which will be ignored by Git):

```bash
cd packages/app
cp .env.local.example .env.local
```

Expand All @@ -63,27 +64,30 @@ Required:
### Run

```bash
npm run dev
cd packages/app
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

### Build

```bash
npm run build
npm start
cd packages/app
pnpm build
pnpm start
```

### Unit Testing

```bash
npm run test:unit
cd packages/app
pnpm test:unit
```

For unit tests we use a combination of Jest and [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)

Page tests should be added to the \_\_tests\_\_ folder at the root as it is not possible co-locate tests and pages in nextjs. Other tests should be co-located in a \_\_tests\_\_ folder next to their related file.
Page tests should be added to the \_\_tests\_\_ folder at the root as it is not possible to co-locate tests and pages in nextjs. Other tests should be co-located in a \_\_tests\_\_ folder next to their related file.

### End-2-End testing

Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"name": "kwenta",
"version": "7.3.0",
"version": "7.3.1",
"description": "Kwenta",
"main": "index.js",
"scripts": {
"pre-commit": "pnpm run --filter \"@kwenta/*\" pre-commit",
"check-types": "pnpm run --filter \"@kwenta/*\" check-types",
"prepare": "husky install",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"lint": "eslint . --ext ts,.tsx && tsc",
"lint:sarif": "node packages/app/testing/lint.js . --ext ts,.tsx && tsc",
"lint": "eslint . --ext ts,.tsx && pnpm check-types",
"lint:fix": "eslint packages --ext ts,.tsx --fix"
},
"repository": {
Expand Down Expand Up @@ -51,6 +49,7 @@
"eslint-plugin-ui-testing": "^2.0.1",
"husky": "8.0.1",
"lint-staged": "^13.0.3",
"prettier": "2.0.5"
"prettier": "2.0.5",
"typescript": "^5.1.3"
}
}
8 changes: 5 additions & 3 deletions packages/app/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
NEXT_PUBLIC_PROVIDER_ID=INFURA
NEXT_PUBLIC_PROVIDER_ID=INFURA # INFURA or BLAST_API
NEXT_PUBLIC_INFURA_PROJECT_ID="INFURA_PROJECT_ID"
NEXT_PUBLIC_BLASTAPI_PROJECT_ID="BLASTAPI_PROJECT_ID"
NEXT_PUBLIC_COMPETITION_ACTIVE=false
NEXT_PUBLIC_SOCKET_API_KEY="SOCKET_API_KEY"
NEXT_PUBLIC_SATSUMA_API_KEY="API_KEY"
NEXT_PUBLIC_THEGRAPH_API_KEY="API_KEY"
NEXT_PUBLIC_DEFAULT_PRICE_SERVICE="KWENTA"
NEXT_PUBLIC_DEFAULT_PRICE_SERVICE="KWENTA" # KWENTA or PYTH
NEXT_PUBLIC_COMPETITION_ACTIVE=false
NEXT_PUBLIC_CLOSE_ONLY=false
NEXT_PUBLIC_WALLETCONNECT_V2_ID="WALLETCONNECT_V2_ID"
1 change: 1 addition & 0 deletions packages/app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charting_library
Loading

0 comments on commit 3df297a

Please sign in to comment.