Skip to content

Commit b1dc72b

Browse files
committed
feat: added chain IDs to injected parameters
1 parent 6ed4a20 commit b1dc72b

File tree

11 files changed

+1951
-264
lines changed

11 files changed

+1951
-264
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@babel/plugin-transform-runtime",
55
"@babel/plugin-proposal-class-properties"
66
],
7-
"sourceMaps": "inline",
7+
"sourceMap": "inline",
88
"env": {
99
"test": {
1010
"presets": ["@babel/preset-env"]

.eslintrc.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:import/recommended",
5+
"plugin:import/react",
6+
"plugin:prettier/recommended"
7+
],
8+
"plugins": [
9+
"prettier",
10+
"import"
11+
],
12+
"env": {
13+
"browser": true,
14+
"es6": true,
15+
"node": true,
16+
"jest": true
17+
},
18+
"globals": {
19+
"Atomics": "readonly",
20+
"SharedArrayBuffer": "readonly"
21+
},
22+
"parser": "babel-eslint",
23+
"parserOptions": {
24+
"ecmaVersion": 2020,
25+
"sourceType": "module"
26+
},
27+
"rules": {
28+
"no-unused-vars": [
29+
"error",
30+
{
31+
"varsIgnorePattern": "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)",
32+
"argsIgnorePattern": "(^_+[0-9]*$)|([iI]gnored$)|(^ignored)"
33+
}
34+
],
35+
"no-console": [
36+
"error",
37+
{
38+
"allow": [
39+
"warn",
40+
"error",
41+
"info",
42+
"debug"
43+
]
44+
}
45+
]
46+
}
47+
}

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"**/*.{json,html,svg,md}": "prettier --write --ignore-unknown",
3+
"**/*.js": [
4+
"prettier --write",
5+
"eslint --fix"
6+
]
7+
}

.prettierrc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"printWidth": 120,
3+
"overrides": [
4+
{
5+
"files": [
6+
"*.json"
7+
],
8+
"options": {
9+
"parser": "json-stringify"
10+
}
11+
}
12+
]
13+
}

package.json

+16-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
"ganache": "ganache-cli",
2525
"prepublishOnly": "run-s test build",
2626
"release": "standard-version",
27-
"test": "jest --config ./jest.config.js"
27+
"test": "jest --config ./jest.config.js",
28+
"prepare": "husky install"
2829
},
2930
"dependencies": {
3031
"@babel/runtime": "^7.15.4",
3132
"axios": "^0.21.0",
3233
"iframe": "^1.0.0",
3334
"js-sha3": "^0.8.0",
34-
"multihashes": "0.4.14"
35+
"multihashes": "0.4.14",
36+
"v8-sandbox": "^2.2.2"
3537
},
3638
"peerDependencies": {
3739
"web3": "^1.3.6"
@@ -43,24 +45,36 @@
4345
"@babel/plugin-transform-runtime": "^7.12.1",
4446
"@babel/preset-env": "^7.12.1",
4547
"assert": "^2.0.0",
48+
"babel-eslint": "^10.1.0",
4649
"babel-jest": "^26.6.1",
4750
"electron": "^13.1.6",
4851
"esdoc": "^1.1.0",
4952
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
5053
"esdoc-standard-plugin": "^1.0.0",
54+
"eslint": "^7.32.0",
55+
"eslint-config-prettier": "^8.3.0",
56+
"eslint-plugin-import": "^2.22.1",
57+
"eslint-plugin-prettier": "^3.4.0",
5158
"ganache-cli": "^6.12.1",
5259
"ganache-core": "^2.13.2",
60+
"husky": ">=6",
5361
"jest": "^26.6.1",
5462
"jest-cli": "^26.6.1",
63+
"lint-staged": ">=10",
5564
"nock": "^13.0.4",
5665
"npm-run-all": "^4.1.5",
5766
"os-browserify": "^0.3.0",
67+
"prettier": "2.2.1",
68+
"prettier-config-standard": "^4.0.0",
5869
"solc": "0.4.25",
5970
"standard-version": "^9.0.0",
6071
"url": "^0.11.0",
6172
"util": "^0.12.3"
6273
},
6374
"volta": {
6475
"node": "14.17.3"
76+
},
77+
"lint-staged": {
78+
"*.js": "eslint --cache --fix"
6579
}
6680
}

0 commit comments

Comments
 (0)