Skip to content

Commit f31cba5

Browse files
authored
Cleanup (pancakeswap#99)
* chore: Clean dependencies * chore: Add commitlint * chore: Remove tg notify (unused)
1 parent 3cf6ae1 commit f31cba5

File tree

5 files changed

+541
-133
lines changed

5 files changed

+541
-133
lines changed

.commitlintrc.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"subject-case": [2, "always", "sentence-case"],
5+
"type-enum": [
6+
2,
7+
"always",
8+
["build", "ci", "chore", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"]
9+
]
10+
}
11+
}

.github/workflows/notify.yml

-17
This file was deleted.

package.json

+31-30
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,21 @@
11
{
2-
"name": "yam",
2+
"name": "pancake-frontend",
33
"version": "0.1.0",
44
"private": true,
5-
"dependencies": {
6-
"@crowdin/crowdin-api-client": "^1.8.16",
7-
"@ethersproject/abi": "^5.0.7",
8-
"@pancakeswap-libs/uikit": "^0.2.2",
9-
"@types/debounce": "^1.2.0",
10-
"@types/jest": "^26.0.9",
11-
"@types/node": "^14.0.27",
12-
"@types/react": "^16.9.46",
13-
"bignumber.js": "^9.0.0",
14-
"debounce": "^1.2.0",
15-
"lodash": "^4.17.20",
16-
"numeral": "^2.0.6",
17-
"react": "^16.13.1",
18-
"react-circular-progressbar": "^2.0.3",
19-
"react-countdown": "^2.2.1",
20-
"react-countup": "^4.3.3",
21-
"react-dom": "^16.13.1",
22-
"react-feather": "^2.0.8",
23-
"react-router-dom": "^5.2.0",
24-
"react-scripts": "^4.0.0",
25-
"styled-components": "^5.1.1",
26-
"typescript": "^4.0.5",
27-
"use-wallet": "^0.8.0",
28-
"web3": "^1.2.11"
29-
},
305
"scripts": {
316
"start": "react-scripts start",
32-
"build": "CI= GENERATE_SOURCEMAP=false react-scripts build",
7+
"build": "CI=false react-scripts build",
338
"test": "react-scripts test",
349
"eject": "react-scripts eject",
3510
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
3611
"format": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'",
3712
"deploy": "yarn build && cp ./build/index.html ./build/200.html && surge ./build sushiswap.org"
3813
},
14+
"husky": {
15+
"hooks": {
16+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
17+
}
18+
},
3919
"eslintConfig": {
4020
"extends": "react-app"
4121
},
@@ -51,10 +31,31 @@
5131
"last 1 safari version"
5232
]
5333
},
54-
"devDependencies": {
55-
"@types/numeral": "0.0.28",
34+
"dependencies": {
35+
"@crowdin/crowdin-api-client": "^1.8.16",
36+
"@ethersproject/abi": "^5.0.7",
37+
"@pancakeswap-libs/uikit": "^0.2.1",
38+
"@types/react": "^16.9.46",
5639
"@types/react-dom": "^16.9.8",
5740
"@types/react-router-dom": "^5.1.5",
58-
"@types/styled-components": "^5.1.4"
41+
"@types/styled-components": "^5.1.4",
42+
"bignumber.js": "^9.0.0",
43+
"lodash": "^4.17.20",
44+
"react": "^16.13.1",
45+
"react-countup": "^4.3.3",
46+
"react-dom": "^16.13.1",
47+
"react-feather": "^2.0.8",
48+
"react-router-dom": "^5.2.0",
49+
"react-scripts": "^4.0.0",
50+
"styled-components": "^5.1.1",
51+
"typescript": "^4.0.5",
52+
"use-wallet": "^0.8.0",
53+
"web3": "^1.2.11"
54+
},
55+
"devDependencies": {
56+
"@commitlint/cli": "^11.0.0",
57+
"@commitlint/config-conventional": "^11.0.0",
58+
"husky": "^4.3.0",
59+
"prettier": "^2.1.2"
5960
}
6061
}

src/contexts/BscProvider/BscProvider.tsx

-10
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,9 @@ const BscProvider: React.FC = ({ children }) => {
1616
const { ethereum }: { ethereum: provider } = useWallet()
1717

1818
useEffect(() => {
19-
// const setBlockDebounced = debounce(setBlock, 300)
2019
if (!ethereum) return
2120
const web3 = new Web3(ethereum)
2221

23-
// const subscription = new Web3(ethereum).eth.subscribe(
24-
// 'newBlockHeaders',
25-
// (error, result) => {
26-
// if (!error) {
27-
// setBlockDebounced(result.number)
28-
// }
29-
// },
30-
// )
31-
3222
const interval = setInterval(async () => {
3323
const latestBlockNumber = await web3.eth.getBlockNumber()
3424
setBlock(latestBlockNumber)

0 commit comments

Comments
 (0)