diff --git a/deploy/helmfile.yaml b/deploy/helmfile.yaml index 0e401dce3d..ac44d659af 100644 --- a/deploy/helmfile.yaml +++ b/deploy/helmfile.yaml @@ -19,7 +19,7 @@ releases: # Deploy front-main - name: bs-stack chart: blockscout/blockscout-stack - version: 1.2.* + version: 1.3.* namespace: front-main labels: app: front @@ -30,7 +30,7 @@ releases: # Deploy l2-optimism-goerli - name: bs-stack chart: blockscout/blockscout-stack - version: 1.2.* + version: 1.3.* namespace: l2-optimism-goerli labels: app: l2-optimism-goerli @@ -55,7 +55,7 @@ releases: type: kubernetes.io/dockerconfigjson - name: bs-stack chart: blockscout/blockscout-stack - version: 1.2.* + version: 1.3.* namespace: review-l2-{{ requiredEnv "GITHUB_REF_NAME_SLUG" }} labels: app: review-l2-{{ requiredEnv "GITHUB_REF_NAME_SLUG" }} @@ -80,7 +80,7 @@ releases: type: kubernetes.io/dockerconfigjson - name: bs-stack chart: blockscout/blockscout-stack - version: 1.2.* + version: 1.3.* namespace: review-{{ requiredEnv "GITHUB_REF_NAME_SLUG" }} labels: app: review-{{ requiredEnv "GITHUB_REF_NAME_SLUG" }} diff --git a/deploy/values/review/values.yaml.gotmpl b/deploy/values/review/values.yaml.gotmpl index 184c277ccc..b66538eb0a 100644 --- a/deploy/values/review/values.yaml.gotmpl +++ b/deploy/values/review/values.yaml.gotmpl @@ -34,6 +34,8 @@ frontend: nginx.ingress.kubernetes.io/proxy-connect-timeout: "15m" nginx.ingress.kubernetes.io/proxy-send-timeout: "15m" nginx.ingress.kubernetes.io/proxy-read-timeout: "15m" + nginx.ingress.kubernetes.io/proxy-buffer-size: "128k" + nginx.ingress.kubernetes.io/proxy-buffers-number: "8" cert-manager.io/cluster-issuer: "zerossl-prod" hostname: review-{{ requiredEnv "GITHUB_REF_NAME_SLUG" }}.k8s-dev.blockscout.com @@ -51,8 +53,8 @@ frontend: NEXT_PUBLIC_FEATURED_NETWORKS: https://raw.githubusercontent.com/blockscout/frontend-configs/dev/configs/featured-networks/eth-goerli.json NEXT_PUBLIC_NETWORK_LOGO: https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/goerli.svg NEXT_PUBLIC_NETWORK_ICON: https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/goerli.svg - NEXT_PUBLIC_API_HOST: etc.blockscout.com - NEXT_PUBLIC_STATS_API_HOST: https://stats-etc.k8s.blockscout.com/ + NEXT_PUBLIC_API_HOST: blockscout-main.k8s-dev.blockscout.com + NEXT_PUBLIC_STATS_API_HOST: https://stats-test.k8s-dev.blockscout.com/ NEXT_PUBLIC_VISUALIZE_API_HOST: http://visualizer-svc.visualizer-testing.svc.cluster.local/ NEXT_PUBLIC_CONTRACT_INFO_API_HOST: https://contracts-info-test.k8s-dev.blockscout.com NEXT_PUBLIC_ADMIN_SERVICE_API_HOST: https://admin-rs-test.k8s-dev.blockscout.com @@ -71,9 +73,6 @@ frontend: NEXT_PUBLIC_VIEWS_TX_ADDITIONAL_FIELDS: "['fee_per_gas']" NEXT_PUBLIC_USE_NEXT_JS_PROXY: true NEXT_PUBLIC_VIEWS_NFT_MARKETPLACES: "[{'name':'LooksRare','collection_url':'https://goerli.looksrare.org/collections/{hash}','instance_url':'https://goerli.looksrare.org/collections/{hash}/{id}','logo_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/nft-marketplace-logos/looks-rare.png'}]" - OTEL_SDK_ENABLED: true - OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger-collector.jaeger.svc.cluster.local:4318 - NEXT_OTEL_VERBOSE: 1 NEXT_PUBLIC_IS_FORUM_SUPPORTED: true NEXT_PUBLIC_FORUM_INDEXER_URL: https://forum-blockscout.ylide.io envFromSecret: diff --git a/lib/api/resources.ts b/lib/api/resources.ts index ab5cae6a86..bf1fc70c56 100644 --- a/lib/api/resources.ts +++ b/lib/api/resources.ts @@ -77,16 +77,16 @@ export const SORTING_FIELDS = [ 'sort', 'order' ]; export const RESOURCES = { // ACCOUNT csrf: { - path: '/api/account/v1/get_csrf', + path: '/api/account/v2/get_csrf', }, user_info: { - path: '/api/account/v1/user/info', + path: '/api/account/v2/user/info', }, email_resend: { - path: '/api/account/v1/email/resend', + path: '/api/account/v2/email/resend', }, custom_abi: { - path: '/api/account/v1/user/custom_abis/:id?', + path: '/api/account/v2/user/custom_abis/:id?', pathParams: [ 'id' as const ], }, watchlist: { @@ -95,7 +95,7 @@ export const RESOURCES = { filterFields: [ ], }, public_tags: { - path: '/api/account/v1/user/public_tags/:id?', + path: '/api/account/v2/user/public_tags/:id?', pathParams: [ 'id' as const ], }, private_tags_address: { @@ -109,7 +109,7 @@ export const RESOURCES = { filterFields: [ ], }, api_keys: { - path: '/api/account/v1/user/api_keys/:id?', + path: '/api/account/v2/user/api_keys/:id?', pathParams: [ 'id' as const ], }, diff --git a/lib/sentry/config.ts b/lib/sentry/config.ts index 2ba5ae826a..9a6055d773 100644 --- a/lib/sentry/config.ts +++ b/lib/sentry/config.ts @@ -1,4 +1,5 @@ import type * as Sentry from '@sentry/react'; +import { BrowserTracing } from '@sentry/tracing'; import appConfig from 'configs/app'; @@ -10,12 +11,13 @@ export const config: Sentry.BrowserOptions | undefined = (() => { } const tracesSampleRate: number | undefined = (() => { - if (feature.environment === 'staging' || feature.environment === 'development') { - return 1; - } - - if (feature.environment === 'production') { - return 0.2; + switch (feature.environment) { + case 'development': + return 1; + case 'staging': + return 0.75; + case 'production': + return 0.2; } })(); @@ -25,6 +27,7 @@ export const config: Sentry.BrowserOptions | undefined = (() => { release: feature.release, enableTracing: feature.enableTracing, tracesSampleRate, + integrations: [ new BrowserTracing() ], // error filtering settings // were taken from here - https://docs.sentry.io/platforms/node/guides/azure-functions/configuration/filtering/#decluttering-sentry diff --git a/package.json b/package.json index fab75bff7b..afbea6711e 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "@opentelemetry/sdk-trace-node": "^1.18.0", "@opentelemetry/semantic-conventions": "^1.18.0", "@sentry/cli": "^2.21.2", - "@sentry/react": "^7.72.0", + "@sentry/react": "7.24.0", + "@sentry/tracing": "7.24.0", "@slise/embed-react": "^2.2.0", "@tanstack/react-query": "^5.4.3", "@tanstack/react-query-devtools": "^5.4.3", diff --git a/ui/address/contract/utils.ts b/ui/address/contract/utils.ts index aea8a17587..c0b01b6c94 100644 --- a/ui/address/contract/utils.ts +++ b/ui/address/contract/utils.ts @@ -9,7 +9,7 @@ export const getNativeCoinValue = (value: string | Array) => { return BigInt(0); } - return BigInt(Number(_value)); + return BigInt(_value); }; export const addZeroesAllowed = (valueType: string) => { diff --git a/ui/shared/monaco/CodeEditor.tsx b/ui/shared/monaco/CodeEditor.tsx index 89f230e582..31182c8a9a 100644 --- a/ui/shared/monaco/CodeEditor.tsx +++ b/ui/shared/monaco/CodeEditor.tsx @@ -1,5 +1,5 @@ import type { SystemStyleObject } from '@chakra-ui/react'; -import { Box, useColorMode, Flex, useToken } from '@chakra-ui/react'; +import { Box, useColorMode, Flex, useToken, Center } from '@chakra-ui/react'; import type { EditorProps } from '@monaco-editor/react'; import MonacoEditor from '@monaco-editor/react'; import type * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; @@ -11,6 +11,7 @@ import type { SmartContractExternalLibrary } from 'types/api/contract'; import useClientRect from 'lib/hooks/useClientRect'; import useIsMobile from 'lib/hooks/useIsMobile'; import isMetaKey from 'lib/isMetaKey'; +import ErrorBoundary from 'ui/shared/ErrorBoundary'; import CodeEditorBreadcrumbs from './CodeEditorBreadcrumbs'; import CodeEditorLoading from './CodeEditorLoading'; @@ -207,6 +208,10 @@ const CodeEditor = ({ data, remappings, libraries, language, mainFile }: Props) }, }), [ editorWidth, themeColors, borderRadius ]); + const renderErrorScreen = React.useCallback(() => { + return
Oops! Something went wrong!
; + }, [ themeColors ]); + if (data.length === 1) { const sx = { ...containerSx, @@ -220,15 +225,17 @@ const CodeEditor = ({ data, remappings, libraries, language, mainFile }: Props) return ( - } - /> + + } + /> + ); } @@ -247,34 +254,36 @@ const CodeEditor = ({ data, remappings, libraries, language, mainFile }: Props) onKeyDown={ handleKeyDown } onKeyUp={ handleKeyUp } > - - + + + + } + /> + + - - } - /> - - + ); }; diff --git a/yarn.lock b/yarn.lock index 83ea03c346..5420ebac98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4961,27 +4961,15 @@ "@noble/hashes" "~1.3.0" "@scure/base" "~1.1.0" -"@sentry-internal/tracing@7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.72.0.tgz#6293a08b8b3dff80499207a4b4994ae70aafc34c" - integrity sha512-DToryaRSHk9R5RLgN4ktYEXZjQdqncOAWPqyyIurji8lIobXFRfmLtGL1wjoCK6sQNgWsjhSM9kXxwGnva1DNw== - dependencies: - "@sentry/core" "7.72.0" - "@sentry/types" "7.72.0" - "@sentry/utils" "7.72.0" - tslib "^2.4.1 || ^1.9.3" - -"@sentry/browser@7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.72.0.tgz#8920d32920031de7ef70140ac13de267e773e5c7" - integrity sha512-fcFDTzqhPd3VZAmmYW3KvBTBaEfrKjPmRhlAsfhkGWYLCHqVkNtzsFER4cmUNRGNxjyt9tcG3WlTTqgLRucycQ== - dependencies: - "@sentry-internal/tracing" "7.72.0" - "@sentry/core" "7.72.0" - "@sentry/replay" "7.72.0" - "@sentry/types" "7.72.0" - "@sentry/utils" "7.72.0" - tslib "^2.4.1 || ^1.9.3" +"@sentry/browser@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.24.0.tgz#3e657f8032322d07f98486f44e048fcdbc3aaff7" + integrity sha512-G2eeYWF7rIz1Dm8PCQiuuTzctrrJSWqD5MCWOICqHr8FrxOPVsVO3Qa/B7/+BSpHd+V7sSUU17oFu41SAWZCOg== + dependencies: + "@sentry/core" "7.24.0" + "@sentry/types" "7.24.0" + "@sentry/utils" "7.24.0" + tslib "^1.9.3" "@sentry/cli@^2.21.2": version "2.21.2" @@ -4994,47 +4982,48 @@ proxy-from-env "^1.1.0" which "^2.0.2" -"@sentry/core@7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.72.0.tgz#df19f9dc1c2cfc5993a73c0c36283c35f9c52f94" - integrity sha512-G03JdQ5ZsFNRjcNNi+QvCjqOuBvYqU92Gs1T2iK3GE8dSBTu2khThydMpG4xrKZQLIpHOyiIhlFZiuPtZ66W8w== +"@sentry/core@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.24.0.tgz#e856a071c702279854d6e5221957d61cd48036cc" + integrity sha512-QVRtmnaWEI0/MHIfBozgsMfh+7WU6OfpvUd72x1Dpk3Zk6Zs7Hqq0YfxfeBd7ApjNjGogPl1beaHcHAHlr3IyA== dependencies: - "@sentry/types" "7.72.0" - "@sentry/utils" "7.72.0" - tslib "^2.4.1 || ^1.9.3" + "@sentry/types" "7.24.0" + "@sentry/utils" "7.24.0" + tslib "^1.9.3" -"@sentry/react@^7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.72.0.tgz#badb4b5e28d27c892917210a6816cb6a2af2c2a5" - integrity sha512-BYFO3uyB9FfdUq05NtsS+OfU636HMZ7avbSEALo24x+OPuaD+fCByTdgxYVpDRYrBPa7lALYzCge0PDcGnGiig== +"@sentry/react@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.24.0.tgz#aa51b09bad8c5d7af163a28a4718abb1e68ea232" + integrity sha512-uW6j7wrPxg7UillUVdsjrsIPqqPEAN/PdotR2O75Qh7s0aR7+Le8i29C4VeW/iubXhlxF/qFvnXwqG5Ji4GwBg== dependencies: - "@sentry/browser" "7.72.0" - "@sentry/types" "7.72.0" - "@sentry/utils" "7.72.0" + "@sentry/browser" "7.24.0" + "@sentry/types" "7.24.0" + "@sentry/utils" "7.24.0" hoist-non-react-statics "^3.3.2" - tslib "^2.4.1 || ^1.9.3" + tslib "^1.9.3" -"@sentry/replay@7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.72.0.tgz#39da5d971045a6d9bf5d3bd16ccc1f5c0c42c4c8" - integrity sha512-dHH/mYCFBwJ/kYmL9L5KihjwQKcefiuvcH0otHSwKSpbbeEoM/BV+SHQoYGd6OMSYnL9fq1dHfF7Zo26p5Yu0Q== +"@sentry/tracing@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.24.0.tgz#d9477a2da9c902ca9663cd4cd87ba279f73f212c" + integrity sha512-O/4hE/lYM6+hM4K5O06pWNuHzZb2ex5f2497bxkwxq17wpJhVp1oDuz8hbWNL7BUNeIbeDpqunBHQzzmVRbL1Q== dependencies: - "@sentry/core" "7.72.0" - "@sentry/types" "7.72.0" - "@sentry/utils" "7.72.0" + "@sentry/core" "7.24.0" + "@sentry/types" "7.24.0" + "@sentry/utils" "7.24.0" + tslib "^1.9.3" -"@sentry/types@7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.72.0.tgz#b474d3821338a545fb2db109715d9aad502bc810" - integrity sha512-g6u0mk62yGshx02rfFADIfyR/S9VXcf3RG2qQPuvykrWtOfN/BOTrZypF7I+MiqKwRW76r3Pcu2C/AB+6z9XQA== +"@sentry/types@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.24.0.tgz#1acc841efe7bd56fc3eb647a613dba92631e8413" + integrity sha512-Xs4r9esBPieJUA6cGmMqfSQiinILdlhScjM+NqDSzxOo8+LRCJzckTLhUttBGVlaAoa4hjCEsfkHA1tVV1DycA== -"@sentry/utils@7.72.0": - version "7.72.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.72.0.tgz#798c764ac61bb658e2117792010ccd20ad8c7b02" - integrity sha512-o/MtqI7WJXuswidH0bSgBP40KN2lrnyQEIx5uoyJUJi/QEaboIsqbxU62vaFJpde8SYrbA+rTnP3J3ujF2gUag== +"@sentry/utils@7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.24.0.tgz#73f100dc8942e73353473eaf3168e5052e2f45be" + integrity sha512-baaRDhHWHTyhmR6V8YKSo0NvN+D17pIKRDmb2vpWHVpTjobKCivNBLRoy3VhnIMS/24XyZnL028QLwkUNLg1Ug== dependencies: - "@sentry/types" "7.72.0" - tslib "^2.4.1 || ^1.9.3" + "@sentry/types" "7.24.0" + tslib "^1.9.3" "@sideway/address@^4.1.3": version "4.1.4" @@ -15242,11 +15231,6 @@ tslib@^2.3.0, tslib@^2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== -"tslib@^2.4.1 || ^1.9.3": - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"