diff --git a/.env b/.env deleted file mode 100644 index ba92387..0000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -VITE_INFURA_API_KEY= -VITE_WALLETCONNECT_ID= diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..cc2cd2a --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +VITE_INFURA_API_KEY= +VITE_WALLETCONNECT_ID= \ No newline at end of file diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2dc02db..ec20ce0 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -6,7 +6,7 @@ module.exports = { "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended", ], - ignorePatterns: ["dist", ".eslintrc.cjs"], + ignorePatterns: ["dist", ".eslintrc.cjs", "index.js"], parser: "@typescript-eslint/parser", plugins: ["react-refresh"], rules: { diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5766683 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Tests +on: + pull_request: + types: [synchronize] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Test using Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.15.1 + - run: yarn + - run: yarn build + - name: Tests ✅ + if: ${{ success() }} + run: | + curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{ + "context": "tests", + "state": "success", + "description": "Tests passed", + "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + }' + - name: Tests 🚨 + if: ${{ failure() }} + run: | + curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{ + "context": "tests", + "state": "failure", + "description": "Tests failed", + "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + }' diff --git a/.gitignore b/.gitignore index a547bf3..a0377b4 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist dist-ssr +.env *.local # Editor directories and files diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ca62475..a2f4523 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -10,4 +10,4 @@ ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] -} +} \ No newline at end of file diff --git a/src/features/common/hooks/useMultipleTokenInfo.ts b/src/features/common/hooks/useMultipleTokenInfo.ts index 0ee4aa9..b887900 100644 --- a/src/features/common/hooks/useMultipleTokenInfo.ts +++ b/src/features/common/hooks/useMultipleTokenInfo.ts @@ -5,7 +5,7 @@ import { multicall } from "wagmi/actions"; type TokenInfoQueryKey = [ chainId: number, tokenAddress: `0x${string}`, - "tokenInfo", + tokenInfo: "tokenInfo", ]; const fetchTokenInfo = async ({