From 1a48f9456dcd2ca839a19dc3c14e3ef3d76c5acb Mon Sep 17 00:00:00 2001 From: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:12:40 +0530 Subject: [PATCH 1/4] Add feature flag for Google Login (#222) --- .env.development | 1 + src/onboarding/Login.jsx | 51 +++++++++++++------------- src/onboarding/Register.jsx | 73 +++++++++++++++++++------------------ 3 files changed, 64 insertions(+), 61 deletions(-) diff --git a/.env.development b/.env.development index 7230ecd1..bf526681 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,4 @@ VITE_API_BASE_URL=http://localhost:3000 VITE_CLERK_PUBLISHABLE_KEY=pk_test_b3B0aW1hbC1jaGlja2VuLTU3LmNsZXJrLmFjY291bnRzLmRldiQ +VITE_GOOGLE_REDIRECT_URL=https://optimal-chicken-57.clerk.accounts.dev/v1/oauth_callback VITE_LOG_LEVEL=debug diff --git a/src/onboarding/Login.jsx b/src/onboarding/Login.jsx index c34032ff..32fb94e6 100644 --- a/src/onboarding/Login.jsx +++ b/src/onboarding/Login.jsx @@ -1,4 +1,4 @@ -import { Button, Input } from '@nextui-org/react'; +import { Button, Divider, Image, Input } from '@nextui-org/react'; import { Link, Navigate, useNavigate } from 'react-router-dom'; import { useSignIn, useUser } from '@clerk/clerk-react'; import { reduceState } from '../shared/helpers'; @@ -54,14 +54,13 @@ export default function Login() { } }; - // const handleGoogleLogin = async () => { - // await signIn.authenticateWithRedirect({ - // strategy: 'oauth_google', - // redirectUrl: - // 'https://hip-primate-84.clerk.accounts.dev/v1/oauth_callback', - // redirectUrlComplete: '/' - // }); - // }; + const handleGoogleLogin = async () => { + await signIn.authenticateWithRedirect({ + strategy: 'oauth_google', + redirectUrl: import.meta.env.VITE_GOOGLE_REDIRECT_URL, + redirectUrlComplete: '/' + }); + }; if (isSignedIn) { return ; @@ -78,8 +77,6 @@ export default function Login() {

- {/* */} -
- {/*
- -

or

- -
*/} - {/* */} + {localStorage.getItem('isGoogleOAuthEnabled') && ( +
+ +

or

+ +
+ )} + {localStorage.getItem('isGoogleOAuthEnabled') && ( + + )} */} + {localStorage.getItem('isGoogleOAuthEnabled') && ( + + )}
Date: Mon, 14 Oct 2024 14:48:32 -0700 Subject: [PATCH 2/4] add VITE_CLERK_PUBLISHABLE_KEY and refine terraform code for release (#220) --- terraform/Amplify/main.tf | 33 ++++++++++++++++++++++++++++++++- terraform/Amplify/output.tf | 8 ++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 terraform/Amplify/output.tf diff --git a/terraform/Amplify/main.tf b/terraform/Amplify/main.tf index 2daed176..1ed102b9 100644 --- a/terraform/Amplify/main.tf +++ b/terraform/Amplify/main.tf @@ -1,5 +1,5 @@ resource "aws_amplify_app" "main" { - name = "restaking-dashboard" + name = "restaking-dashboard-app" repository = "https://github.com/NethermindEth/restaking-dashboard" environment_variables = { @@ -16,11 +16,21 @@ resource "aws_amplify_app" "main" { status = "200" target = "/index.html" } + } resource "aws_amplify_branch" "main" { app_id = aws_amplify_app.main.id branch_name = "main" + stage = "DEVELOPMENT" + + enable_auto_build = false +} + +# Release branch for production environment +resource "aws_amplify_branch" "release" { + app_id = aws_amplify_app.main.id + branch_name = "release/v0.1.0" stage = "PRODUCTION" enable_auto_build = false @@ -37,6 +47,21 @@ resource "aws_amplify_domain_association" "main" { branch_name = aws_amplify_branch.main.branch_name prefix = "stage" } + + # add this for pre-production domain + # https://prod.restaking.info + sub_domain { + branch_name = aws_amplify_branch.release.branch_name + prefix = "prod" + } + + # add this for production domain + # https://restaking.info + sub_domain { + branch_name = aws_amplify_branch.release.branch_name + prefix = "" + } + } @@ -46,3 +71,9 @@ resource "aws_amplify_webhook" "stage" { description = "stage" } + +resource "aws_amplify_webhook" "release" { + app_id = aws_amplify_app.main.id + branch_name = aws_amplify_branch.release.branch_name + description = "release" +} diff --git a/terraform/Amplify/output.tf b/terraform/Amplify/output.tf new file mode 100644 index 00000000..467073b5 --- /dev/null +++ b/terraform/Amplify/output.tf @@ -0,0 +1,8 @@ + +output "aws_amplify_domain_association" { + value = aws_amplify_domain_association.main.sub_domain +} + +output "aws_amplify_webhook"{ +value = aws_amplify_webhook.stage.url +} From a63ee3838d8bb5437a5667b3c4b70e4dc8d7bbbb Mon Sep 17 00:00:00 2001 From: Mohd Zishan <72738005+Zishan-7@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:29:40 +0530 Subject: [PATCH 3/4] Fix promotion operator navigation (#224) --- src/avs/AVSDetailsOperatorsTab.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/avs/AVSDetailsOperatorsTab.jsx b/src/avs/AVSDetailsOperatorsTab.jsx index e809bd1b..63acbd41 100644 --- a/src/avs/AVSDetailsOperatorsTab.jsx +++ b/src/avs/AVSDetailsOperatorsTab.jsx @@ -257,7 +257,7 @@ function AVSOperatorsList({ address, avsError, isAVSLoading, tvl }) { className="size-16 cursor-pointer border-t border-outline bg-black/100 transition-colors hover:bg-default" key={`promoted-operator-item-${i}`} onClick={() => - navigate(`/operators/${operator.address}`, { + navigate(`/operators/${operator.operator}`, { state: { operator } }) } From 8391ba9b1a2f0ba97154043e579a85959e3576ae Mon Sep 17 00:00:00 2001 From: Hong Zheng You <107991825+vincenthongzy@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:53:13 +0800 Subject: [PATCH 4/4] Fix EigenLayer total TVL on homepage (#227) --- src/home/OverviewStats.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/home/OverviewStats.jsx b/src/home/OverviewStats.jsx index 254241b9..e9985caf 100644 --- a/src/home/OverviewStats.jsx +++ b/src/home/OverviewStats.jsx @@ -39,7 +39,8 @@ export default function OverviewStats({ const calculateEigenLayerTVL = () => eigenLayerTVL[eigenLayerTVL.length - 1].ethTVL + - eigenLayerTVL[eigenLayerTVL.length - 1].lstTVL; + eigenLayerTVL[eigenLayerTVL.length - 1].lstTVL + + eigenLayerTVL[eigenLayerTVL.length - 1].eigenTVL; useEffect(() => { const fetchOperators = async () => {