From 2ed5dc63e048f557b91c88b4f419b06b718ca759 Mon Sep 17 00:00:00 2001 From: Zachary Belford Date: Wed, 14 Oct 2020 12:54:55 -0700 Subject: [PATCH] fix: update node version and typescript --- .circleci/config.yml | 8 ++------ .jsbeautifyrc | 23 ++++++++++++++++++++++ .node-version | 2 +- package-lock.json | 19 ++++++++++++------ package.json | 4 ++-- src/components/BlockView/BlockGasPrice.tsx | 7 +++---- 6 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 .jsbeautifyrc diff --git a/.circleci/config.yml b/.circleci/config.yml index b7e138e6..a8e83ae7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,12 +24,12 @@ aliases: defaults: &defaults working_directory: ~/project + docker: + - image: circleci/node:12 jobs: test: <<: *defaults - docker: - - image: circleci/node:10 steps: - checkout - restore_cache: *restore-deps-cache @@ -41,8 +41,6 @@ jobs: build: <<: *defaults - docker: - - image: circleci/node:10 steps: - checkout - restore_cache: *restore-deps-cache @@ -52,8 +50,6 @@ jobs: release: <<: *defaults - docker: - - image: circleci/node:10 steps: - checkout - restore_cache: *restore-deps-cache diff --git a/.jsbeautifyrc b/.jsbeautifyrc new file mode 100644 index 00000000..a9a837b3 --- /dev/null +++ b/.jsbeautifyrc @@ -0,0 +1,23 @@ +{ + "indent_size": 2, + "indent_char": " ", + "eol": "\n", + "indent_level": 0, + "indent_with_tabs": false, + "preserve_newlines": true, + "max_preserve_newlines": 2, + "jslint_happy": false, + "space_after_anon_function": false, + "brace_style": "collapse", + "keep_array_indentation": false, + "keep_function_indentation": false, + "space_before_conditional": true, + "break_chained_methods": true, + "eval_code": false, + "unescape_strings": false, + "wrap_line_length": 80, + "wrap_attributes": "auto", + "wrap_attributes_indent_size": 2, + "e4x": true, + "end_with_newline": true +} \ No newline at end of file diff --git a/.node-version b/.node-version index 348076b9..ce122aaa 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -10.15.3 +12.18.4 diff --git a/package-lock.json b/package-lock.json index 87441de5..ef83e5e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2711,9 +2711,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "8.10.59", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.59.tgz", - "integrity": "sha512-8RkBivJrDCyPpBXhVZcjh7cQxVBSmRk9QM7hOketZzp6Tg79c0N8kkpAIito9bnJ3HCVCHVYz+KHTEbfQNfeVQ==" + "version": "14.11.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.8.tgz", + "integrity": "sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -22289,6 +22289,13 @@ "http-response-object": "^3.0.1", "promise": "^8.0.0", "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.64", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.64.tgz", + "integrity": "sha512-/EwBIb+imu8Qi/A3NF9sJ9iuKo7yV+pryqjmeRqaU0C4wBAOhas5mdvoYeJ5PCKrh6thRSJHdoasFqh3BQGILA==" + } } }, "throat": { @@ -22607,9 +22614,9 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, "typescript": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz", - "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz", + "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index a853f7d9..a33e958f 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@types/bignumber.js": "^4.0.3", "@types/jest": "^21.1.6", "@types/lodash": "^4.14.149", - "@types/node": "^8.10.58", + "@types/node": "^14.11.8", "@types/react": "^16.9.11", "@types/react-dom": "^16.9.3", "@types/react-router-dom": "^5.1.1", @@ -76,7 +76,7 @@ "ts-node": "^8.5.0", "tslint": "^5.8.0", "tslint-react": "^4.1.0", - "typescript": "^3.7.2" + "typescript": "^4.0.3" }, "browserslist": { "production": [ diff --git a/src/components/BlockView/BlockGasPrice.tsx b/src/components/BlockView/BlockGasPrice.tsx index 30ad1481..b1e78591 100644 --- a/src/components/BlockView/BlockGasPrice.tsx +++ b/src/components/BlockView/BlockGasPrice.tsx @@ -11,27 +11,26 @@ function BlockGasPrice(props: any) { if (transactions.length === 0) {return <>;} - return ( <> {t("Average Gas Price")} - {_.meanBy(transactions, (t: any) => parseInt(t.gasPrice, 16))} + {/* {_.meanBy(transactions, (t: any) => BigInt(t.gasPrice))} */} {t("Min Gas Price")} - {hexToNumber(_.minBy(transactions, (t: any) => parseInt(t.gasPrice, 16)).gasPrice)} + {/* {hexToNumber(_.minBy(transactions, (t: any) => BigInt(t.gasPrice)).gasPrice)} */} {t("Max Gas Price")} - {hexToNumber(_.maxBy(transactions, (t: any) => parseInt(t.gasPrice, 16)).gasPrice)} + {/* {hexToNumber(_.maxBy(transactions, (t: any) => BigInt(t.gasPrice)).gasPrice)} */}