From 42249ef2ec701a33d92b166a10c9d825ff8c51db Mon Sep 17 00:00:00 2001 From: Christopher Cali Date: Tue, 14 Nov 2023 10:08:03 -0500 Subject: [PATCH] Reduce number of node requests via provider options + composable refactors --- .vscode/settings.json | 10 +- apps/web/.eslintrc | 12 +- apps/web/src/App.vue | 21 ++ .../web/src/components/ConnectWalletsFlow.vue | 12 +- apps/web/src/composables/auth.ts | 21 +- apps/web/src/composables/breakdownMetrics.ts | 250 +++++++-------- apps/web/src/composables/contracts.ts | 68 ++-- apps/web/src/composables/environment.ts | 7 +- apps/web/src/composables/ethers.ts | 132 +------- apps/web/src/composables/format.ts | 55 ++-- apps/web/src/composables/operators.ts | 59 ++-- apps/web/src/composables/staking.ts | 91 +++--- apps/web/src/composables/user.ts | 65 ++-- apps/web/src/composables/walletConnectV2.ts | 2 +- apps/web/src/main.ts | 13 +- apps/web/src/pages/operators/Operator.vue | 55 ++-- .../overview/components/BreakdownChart.vue | 28 +- .../src/pages/overview/components/Staking.vue | 292 +++++++++--------- common/env/src/index.ts | 5 + package-lock.json | 33 +- scripts/cdk/deploy.ts | 4 +- scripts/root/dev.ts | 4 +- 22 files changed, 618 insertions(+), 621 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 960b64ffb..025d86f9c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,12 @@ { + "css.lint.unknownAtRules": "ignore", "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, + "eslint.validate": [ + "vue", + "typescript" + ], "[html]": { "editor.defaultFormatter": "Vue.volar" }, @@ -14,10 +19,5 @@ "[json]": { "editor.defaultFormatter": "vscode.json-language-features" }, - "eslint.validate": [ - "vue", - "typescript" - ], - "css.lint.unknownAtRules": "ignore", "volar.inlayHints.eventArgumentInInlineHandlers": false } \ No newline at end of file diff --git a/apps/web/.eslintrc b/apps/web/.eslintrc index 9009c65f6..2b7a8f6c2 100644 --- a/apps/web/.eslintrc +++ b/apps/web/.eslintrc @@ -21,8 +21,16 @@ "@typescript-eslint" ], "rules": { - "max-len": ["error", { "code": 200, "ignoreStrings": true, "comments":300, "ignoreTemplateLiterals": true }], - "vue/multi-word-component-names": "off", + "max-len": [ + "error", + { + "code": 200, + "ignoreStrings": true, + "comments": 300, + "ignoreTemplateLiterals": true + } + ], + "vue/multi-word-component-names": "off" }, "ignorePatterns": [ "**/node_modules/**", diff --git a/apps/web/src/App.vue b/apps/web/src/App.vue index 5ea62b95d..b318984b7 100644 --- a/apps/web/src/App.vue +++ b/apps/web/src/App.vue @@ -1,6 +1,27 @@