From 05b0c04fe17ac64900a3399a7d0c78dd0b26b638 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 24 Apr 2024 14:56:19 +0200 Subject: [PATCH 1/4] fix tabs cut after API data is loaded --- ui/shared/Tabs/TabsWithScroll.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/shared/Tabs/TabsWithScroll.tsx b/ui/shared/Tabs/TabsWithScroll.tsx index 5c2f2b39ce..967b0f9740 100644 --- a/ui/shared/Tabs/TabsWithScroll.tsx +++ b/ui/shared/Tabs/TabsWithScroll.tsx @@ -91,10 +91,12 @@ const TabsWithScroll = ({ lazyBehavior={ lazyBehavior } > tab.id).join(':') } tabs={ tabs } tabListProps={ tabListProps } rightSlot={ rightSlot } From 3944283d51c026835fde76b401daf6c02bdaecb6 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 24 Apr 2024 15:45:13 +0200 Subject: [PATCH 2/4] update demo values --- deploy/values/review/values.yaml.gotmpl | 1 - 1 file changed, 1 deletion(-) diff --git a/deploy/values/review/values.yaml.gotmpl b/deploy/values/review/values.yaml.gotmpl index c8f3c440b1..16275aa12b 100644 --- a/deploy/values/review/values.yaml.gotmpl +++ b/deploy/values/review/values.yaml.gotmpl @@ -61,7 +61,6 @@ frontend: NEXT_PUBLIC_NAME_SERVICE_API_HOST: https://bens-rs-test.k8s-dev.blockscout.com NEXT_PUBLIC_AUTH_URL: https://blockscout-main.k8s-dev.blockscout.com NEXT_PUBLIC_MARKETPLACE_ENABLED: true - NEXT_PUBLIC_MARKETPLACE_CONFIG_URL: https://raw.githubusercontent.com/blockscout/frontend-configs/dev/configs/marketplace/eth-goerli.json NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM: https://airtable.com/shrqUAcjgGJ4jU88C NEXT_PUBLIC_MARKETPLACE_SUGGEST_IDEAS_FORM: https://airtable.com/appiy5yijZpMMSKjT/pag3t82DUCyhGRZZO/form NEXT_PUBLIC_MARKETPLACE_SECURITY_REPORTS_URL: https://gist.githubusercontent.com/maxaleks/ce5c7e3de53e8f5b240b88265daf5839/raw/328383c958a8f7ecccf6d50c953bcdf8ab3faa0a/security_reports_goerli_test.json From 33e1cf1b0a6a315218f48f74b389c723477f51d2 Mon Sep 17 00:00:00 2001 From: Max Alekseenko Date: Tue, 30 Apr 2024 14:42:42 +0200 Subject: [PATCH 3/4] fix fullscreen height on android --- ui/shared/layout/LayoutApp.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/shared/layout/LayoutApp.tsx b/ui/shared/layout/LayoutApp.tsx index 515c79bbcb..3ac8e463d8 100644 --- a/ui/shared/layout/LayoutApp.tsx +++ b/ui/shared/layout/LayoutApp.tsx @@ -11,7 +11,7 @@ const LayoutDefault = ({ children }: Props) => { return ( From c4b58cf0c05d9789cbe68b5f9345b098c378ca35 Mon Sep 17 00:00:00 2001 From: Max Alekseenko Date: Tue, 30 Apr 2024 15:54:52 +0200 Subject: [PATCH 4/4] allow admin service without the account enabled --- deploy/tools/envs-validator/schema.ts | 17 +++++++++++++---- deploy/tools/envs-validator/test.sh | 5 +---- deploy/tools/envs-validator/test/.env.base | 14 +++++++++++++- deploy/tools/envs-validator/test/.env.common | 3 --- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/deploy/tools/envs-validator/schema.ts b/deploy/tools/envs-validator/schema.ts index 191eedd27d..dfad3d4f9a 100644 --- a/deploy/tools/envs-validator/schema.ts +++ b/deploy/tools/envs-validator/schema.ts @@ -349,12 +349,20 @@ const accountSchema = yup then: (schema) => schema.test(urlTest).required(), otherwise: (schema) => schema.max(-1, 'NEXT_PUBLIC_LOGOUT_URL cannot not be used if NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED is not set to "true"'), }), + }); + +const adminServiceSchema = yup + .object() + .shape({ NEXT_PUBLIC_ADMIN_SERVICE_API_HOST: yup .string() - .when('NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED', { - is: (value: boolean) => value, + .when([ 'NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED', 'NEXT_PUBLIC_MARKETPLACE_ENABLED' ], { + is: (value1: boolean, value2: boolean) => value1 || value2, then: (schema) => schema.test(urlTest), - otherwise: (schema) => schema.max(-1, 'NEXT_PUBLIC_ADMIN_SERVICE_API_HOST cannot not be used if NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED is not set to "true"'), + otherwise: (schema) => schema.max( + -1, + 'NEXT_PUBLIC_ADMIN_SERVICE_API_HOST cannot not be used if NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED or NEXT_PUBLIC_MARKETPLACE_ENABLED is not set to "true"', + ), }), }); @@ -629,6 +637,7 @@ const schema = yup .concat(rollupSchema) .concat(beaconChainSchema) .concat(bridgedTokensSchema) - .concat(sentrySchema); + .concat(sentrySchema) + .concat(adminServiceSchema); export default schema; diff --git a/deploy/tools/envs-validator/test.sh b/deploy/tools/envs-validator/test.sh index 179ef25bc9..7e29716658 100755 --- a/deploy/tools/envs-validator/test.sh +++ b/deploy/tools/envs-validator/test.sh @@ -1,6 +1,5 @@ #!/bin/bash -secrets_file=".env.secrets" test_folder="./test" common_file="${test_folder}/.env.common" @@ -8,7 +7,6 @@ common_file="${test_folder}/.env.common" export NEXT_PUBLIC_GIT_COMMIT_SHA=$(git rev-parse --short HEAD) export NEXT_PUBLIC_GIT_TAG=$(git describe --tags --abbrev=0) ../../scripts/collect_envs.sh ../../../docs/ENVS.md -cp ../../../.env.example ${secrets_file} # Copy test assets mkdir -p "./public/assets" @@ -26,7 +24,6 @@ validate_file() { dotenv \ -e $test_file \ -e $common_file \ - -e $secrets_file \ yarn run validate -- --silent if [ $? -eq 0 ]; then @@ -46,4 +43,4 @@ for file in "${test_files[@]}"; do if [ $? -eq 1 ]; then exit 1 fi -done \ No newline at end of file +done diff --git a/deploy/tools/envs-validator/test/.env.base b/deploy/tools/envs-validator/test/.env.base index d8ef046d25..62a5a81b6f 100644 --- a/deploy/tools/envs-validator/test/.env.base +++ b/deploy/tools/envs-validator/test/.env.base @@ -1,3 +1,15 @@ +NEXT_PUBLIC_SENTRY_DSN=https://sentry.io +NEXT_PUBLIC_AUTH_URL=https://example.com +NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true +NEXT_PUBLIC_LOGOUT_URL=https://example.com +NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=xxx +NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY=xxx +NEXT_PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID=UA-XXXXXX-X +NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN=xxx +NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY=xxx +NEXT_PUBLIC_AUTH0_CLIENT_ID=xxx +FAVICON_GENERATOR_API_KEY=xxx +NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY=xxx NEXT_PUBLIC_AD_TEXT_PROVIDER=coinzilla NEXT_PUBLIC_AD_BANNER_PROVIDER=slise NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://example.com @@ -58,4 +70,4 @@ NEXT_PUBLIC_VISUALIZE_API_BASE_PATH=https://example.com NEXT_PUBLIC_WEB3_DISABLE_ADD_TOKEN_TO_WALLET=false NEXT_PUBLIC_WEB3_WALLETS=['coinbase','metamask','token_pocket'] NEXT_PUBLIC_SWAP_BUTTON_URL=uniswap -NEXT_PUBLIC_VALIDATORS_CHAIN_TYPE=stability \ No newline at end of file +NEXT_PUBLIC_VALIDATORS_CHAIN_TYPE=stability diff --git a/deploy/tools/envs-validator/test/.env.common b/deploy/tools/envs-validator/test/.env.common index 1f900840ff..5788f392d3 100644 --- a/deploy/tools/envs-validator/test/.env.common +++ b/deploy/tools/envs-validator/test/.env.common @@ -1,7 +1,4 @@ NEXT_PUBLIC_API_HOST=blockscout.com NEXT_PUBLIC_APP_HOST=localhost -NEXT_PUBLIC_AUTH_URL=https://example.com -NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true -NEXT_PUBLIC_LOGOUT_URL=https://example.com NEXT_PUBLIC_NETWORK_ID=1 NEXT_PUBLIC_NETWORK_NAME=Testnet