-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy new ten gateway frontend #1686
Conversation
WalkthroughThe changes involve updates to a wallet extension's infrastructure and frontend. The Docker build command now includes a build argument for testnet types. The frontend sees the addition of Node.js and npm, creation of environment files, and npm builds. The backend removes obsolete code and updates static file handling. Frontend static assets and components undergo significant refactoring, with changes to error handling, UI components, and constants. Configuration files are modified to alter output directories, and service logic is updated to reflect new constants and address handling. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 13
Configuration used: CodeRabbit UI
Files ignored due to filter (13)
- tools/walletextension/api/static/_next/static/media/CloudSoft-Bold_700.fa099554.otf
- tools/walletextension/api/static/_next/static/media/CloudSoft-Light_300.f0109ea4.otf
- tools/walletextension/api/static/assets/images/ten-temp-logo.svg
- tools/walletextension/api/static/docs/privacy.json
- tools/walletextension/api/static/docs/terms.json
- tools/walletextension/api/static/favicon-32x32.png
- tools/walletextension/api/static/favicon.ico
- tools/walletextension/api/staticOG/MetaMaskIcon.png
- tools/walletextension/api/staticOG/Metamask Network Icon.png
- tools/walletextension/api/staticOG/check.svg
- tools/walletextension/api/staticOG/copy.svg
- tools/walletextension/api/staticOG/favicon-32x32.png
- tools/walletextension/api/staticOG/ten.svg
Files selected for processing (29)
- .github/workflows/manual-deploy-obscuro-gateway.yml (1 hunks)
- tools/walletextension/Dockerfile (2 hunks)
- tools/walletextension/api/server.go (2 hunks)
- tools/walletextension/api/static/404.html (1 hunks)
- tools/walletextension/api/static/500.html (1 hunks)
- tools/walletextension/api/static/_next/static/6kU3ierzbdTB-lFn-By_G/_buildManifest.js (1 hunks)
- tools/walletextension/api/static/_next/static/6kU3ierzbdTB-lFn-By_G/_ssgManifest.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/394-7efaf349d313593f.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/664-8c5a4c082990d0a6.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/752-8e4e922b39786da1.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/995-3bfbdf9e32a6b7ea.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/ee9ce975-fcbd1d46c64023aa.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/pages/404-4fa995450413f980.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/pages/500-d12c94c5978ab4a3.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/pages/_error-ae035ff593cf4f14.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/pages/docs/[id]-f650df15c9822f51.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/pages/index-3c93b410b3c75b9e.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js (1 hunks)
- tools/walletextension/api/static/_next/static/chunks/webpack-2e8c7052a4f71b42.js (1 hunks)
- tools/walletextension/api/static/_next/static/css/319b66476ef61839.css (1 hunks)
- tools/walletextension/api/static/docs/[id].html (1 hunks)
- tools/walletextension/api/static/index.html (1 hunks)
- tools/walletextension/frontend/next.config.js (1 hunks)
- tools/walletextension/frontend/src/api/gateway.ts (5 hunks)
- tools/walletextension/frontend/src/components/modules/common/network-status.tsx (1 hunks)
- tools/walletextension/frontend/src/lib/constants.ts (1 hunks)
- tools/walletextension/frontend/src/lib/utils.ts (1 hunks)
- tools/walletextension/frontend/src/services/useGatewayService.ts (2 hunks)
- tools/walletextension/main/main.go (1 hunks)
Files not summarized due to errors (2)
- tools/walletextension/api/static/_next/static/chunks/394-7efaf349d313593f.js: Error: Message exceeds token limit
- tools/walletextension/api/static/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js: Error: Message exceeds token limit
Files skipped from review due to trivial changes (5)
- tools/walletextension/api/static/500.html
- tools/walletextension/api/static/_next/static/6kU3ierzbdTB-lFn-By_G/_ssgManifest.js
- tools/walletextension/api/static/_next/static/chunks/webpack-2e8c7052a4f71b42.js
- tools/walletextension/api/static/docs/[id].html
- tools/walletextension/main/main.go
Additional comments: 30
.github/workflows/manual-deploy-obscuro-gateway.yml (1)
- 53-57: The addition of the
TESTNET_TYPE
build argument to the Docker build command is consistent with the PR objectives and the AI-generated overview. This change allows for different configurations based on the testnet type, which is a necessary step for deploying to various testnets.tools/walletextension/Dockerfile (3)
21-22: Installation of Node.js and npm is correctly added to support frontend builds.
12-12: The
TESTNET_TYPE
argument is correctly defined to parameterize the Docker build.51-53: The wallet extension binary is correctly copied to a lightweight Alpine image in the final stage.
tools/walletextension/api/server.go (2)
14-19: The changes to embed static files and serve them from the
static
directory are correctly implemented.65-67: The error handling for serving static files is appropriate, using a panic to ensure that the server does not start without the necessary frontend assets.
tools/walletextension/api/static/_next/static/6kU3ierzbdTB-lFn-By_G/_buildManifest.js (1)
- 1-1: The changes in the build manifest seem to reflect the updates to the static files and pages as mentioned in the PR objectives. This file is auto-generated, so it's important to ensure that the build process that generates this file is correctly configured to reflect the new structure of the project.
tools/walletextension/api/static/_next/static/chunks/394-7efaf349d313593f.js (3)
1-1: The provided code hunk is extensive and appears to be part of a larger library or application for managing popper elements in a UI. Without specific changes marked, it's challenging to review. Please clarify if there are particular areas of concern or changes made in this hunk.
1-1: Ensure that event listeners added in
useEffect
hooks are properly cleaned up to prevent memory leaks. This is particularly important for listeners attached to the window or document objects.1-1: Monitor the performance impact of CSS-in-JS patterns, especially when involving calculations and dynamic updates to styles. Consider memoizing style objects or using CSS variables for better performance.
tools/walletextension/api/static/_next/static/chunks/664-8c5a4c082990d0a6.js (4)
1-1: The code in this hunk initializes several actions and prefetch kinds for what appears to be a Next.js application. Ensure that these actions and kinds are consistent with the new frontend deployment strategy and that they do not conflict with any updated gateway backend URLs or removed frontend files.
1-1: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [5170-5170]
The
prefetch
function and thelinkClicked
event handler are critical parts of the frontend navigation experience. Verify that the logic for prefetching and handling link clicks aligns with the updated frontend paths and the new deployment strategy. Additionally, ensure that the removal of old frontend files has not affected the functionality of these methods.
- 1-1: > Note: This review was outside the patches, and no patch overlapping with it was found. Original lines [5170-5170]
The
y
component, which appears to be a wrapper for Next.js links, includes logic for handling absolute URLs and prefetching. Verify that this logic is consistent with the updated gateway backend URLs and the new deployment strategy. Ensure that there are no references to removed frontend files or outdated URLs within this component's logic.
- 1-1: Typically, built files like this are not the target of code reviews. It is recommended to review the source code that generates these files to ensure that any changes are captured at the source level.
tools/walletextension/api/static/_next/static/chunks/752-8e4e922b39786da1.js (1)
- 1-1: The renaming of "Badge" to "Terminal" is consistent with the PR objectives and the AI-generated overview, which indicates a refactoring of components and functions.
tools/walletextension/api/static/_next/static/chunks/995-3bfbdf9e32a6b7ea.js (1)
- 1-1: The changes in this file are part of the static assets for the frontend. Ensure that the minification process has not introduced any errors and that the changes are consistent with the rest of the codebase, especially given the updates to the frontend paths and the removal of old frontend files.
The verification script did not find any minified JavaScript files in the specified directory, which could mean that either the files do not exist or the directory path is incorrect. However, the absence of an error message suggests that the script executed without issues, but simply did not find any files matching the criteria. This could be due to the files being located in a different directory or not being present in the expected location.
Given this new context, the original concern about ensuring the minification process has not introduced any errors cannot be directly addressed because the script did not find any minified files to check against. However, since there is no output or error, it is not possible to conclude whether the minification process is correct or not.
Final review comment:
The verification script did not find minified JavaScript files in the expected location. Ensure that the files are correctly placed and that the build process is accurately reflected in the repository. If the files are located elsewhere or if the build process has changed, please update the verification script accordingly.
tools/walletextension/api/static/_next/static/chunks/ee9ce975-fcbd1d46c64023aa.js (1)
- 1-1: Given the nature of the changes and the context provided, it appears that the JavaScript file is part of the updated static assets for the frontend deployment. Since the file is minified and part of a webpack bundle, it's not feasible to review the logic or correctness of the code without the unminified source. However, it's important to ensure that the changes align with the intended updates and that all necessary tests have been performed to confirm the frontend behaves as expected on testnets and locally.
tools/walletextension/api/static/_next/static/chunks/pages/404-4fa995450413f980.js (1)
- 1-1: The code in the hunk appears to be a minified JavaScript file for a custom 404 error page component in a Next.js application. The structure follows the standard pattern for Next.js page components, and there are no visible syntax errors or issues with the way the component is being registered. However, due to the minified nature of the file, it's not possible to provide a detailed review of the logic or structure of the code. Ensure that the minification and bundling process has been tested thoroughly to prevent runtime errors.
tools/walletextension/api/static/_next/static/chunks/pages/_error-ae035ff593cf4f14.js (1)
- 1-1: The
CustomError
component and itsgetInitialProps
method have been added to handle errors in a custom way. The code is minified as expected for production. Ensure that this new error handling aligns with the overall error strategy of the application.tools/walletextension/api/static/_next/static/chunks/pages/docs/[id]-f650df15c9822f51.js (1)
- 1-1: The code appears to be part of the compiled output for a Next.js application. It's important to ensure that the changes made in the source code are reflected correctly in the compiled output. Since this is a minified file, it's not possible to review the high-level changes mentioned in the PR overview, such as the method for embedding and serving static files or the updates to frontend paths. However, the presence of custom error components like
Custom404Error
andCustomError
suggests that error handling has been considered in the application.tools/walletextension/api/static/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js (1)
- 1-1: : Reviewing minified JavaScript code is not practical due to its condensed nature and lack of readability. It's recommended to review the source code before it's minified for a more effective code review process.
tools/walletextension/api/static/_next/static/css/319b66476ef61839.css (1)
- 1-3: The CSS file appears to be correctly minified and includes a version comment for Tailwind CSS, which is good for maintainability. Ensure that there is an unminified source version of this file available for development purposes.
tools/walletextension/api/static/index.html (2)
- 1-1: Confirm that the
__NEXT_DATA__
script tag contains the correct configuration for the Next.js application, especially thebuildId
and any other deployment-specific configurations.
#!/bin/bash # Search for the __NEXT_DATA__ script tag in HTML files and display its content rg '__NEXT_DATA__' -t html
- 1-1: Check the implementation of the offline notification to ensure it is displayed correctly when the user is offline and that it does not interfere with the user experience when online.
tools/walletextension/frontend/next.config.js (1)
- 1-8: The changes to
next.config.js
with the addition ofoutput
anddistDir
properties are consistent with the PR objectives to alter the output directory and distribution directory of the Next.js application. Ensure that these new settings are compatible with the rest of the application and the deployment process.tools/walletextension/frontend/src/api/gateway.ts (2)
5-5: The addition of
tenGatewayAddress
from../lib/constants
aligns with the PR objectives to update frontend paths for gateway backend URLs.10-10: The update to prepend
tenGatewayAddress
to the URLs in the HTTP request functions is consistent with the PR objectives to ensure the frontend interacts with the updated gateway backend URLs.Also applies to: 20-20, 37-37, 48-48, 58-58
tools/walletextension/frontend/src/lib/constants.ts (2)
1-1: The introduction of a fallback URL for
tenGatewayAddress
is a good practice for resilience and default configuration. However, ensure that the fallback URL (http://127.0.0.1:3000
) is intended for use in testnet and local deployments, as mentioned in the PR objectives.1-1: Confirm that the
default
object withintestnetUrls
is intended to use thetenGatewayAddress
as its URL, which now includes the fallback logic.tools/walletextension/frontend/src/lib/utils.ts (1)
- 39-44: The removal of
getRPCFromUrl
function should be verified across the codebase to ensure there are no remaining calls or dependencies on this function that could lead to runtime errors.
The search for references to the removed
getRPCFromUrl
function yielded no results, indicating that there are no remaining calls or dependencies on this function in the TypeScript files. This suggests that the removal has been handled correctly without leaving any orphaned code.
@@ -8,7 +8,7 @@ const MessageContent = ( | |||
); | |||
|
|||
export const NetworkStatus = ({ message = MessageContent }) => { | |||
const [isOnline, setIsOnline] = React.useState(navigator.onLine); | |||
const [isOnline, setIsOnline] = React.useState(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isOnline
state is hardcoded to true
, which may not reflect the actual network status. Verify if this is the intended behavior, as it could mislead users into thinking they are online when they are not.
); | ||
|
||
export const NetworkStatus = ({ message = MessageContent }) => { | ||
const [isOnline, setIsOnline] = React.useState(navigator.onLine); | ||
const [isOnline, setIsOnline] = React.useState(true); | ||
|
||
React.useEffect(() => { | ||
const setOnlineStatus = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [13-24]
The useEffect
hook sets up event listeners to update isOnline
based on the network status, but this is redundant since isOnline
is hardcoded. Consider removing the event listeners and associated logic if they are no longer needed.
@@ -0,0 +1 @@ | |||
<!DOCTYPE html><html lang="en"><head><title>Ten Gateway </title><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain." content="Ten Gateway"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:site" content="@obscuronet"/><meta name="twitter:title" content="Ten Gateway "/><meta name="twitter:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta name="twitter:image" content=""/><link rel="canonical" href="https://obscu.ro"/><meta property="og:locale" content="en_US"/><meta property="og:site_name" content="Ten Gateway"/><meta property="og:type" content="website"/><meta property="og:title" content="Ten Gateway "/><meta property="og:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta property="og:image" content=""/><meta property="og:url" content="https://obscu.ro"/><link rel="icon" href="/favicon.ico"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png"/><link rel="manifest" href="/manifest.json"/><meta name="next-head-count" content="20"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/319b66476ef61839.css" as="style" crossorigin=""/><link rel="stylesheet" href="/_next/static/css/319b66476ef61839.css" crossorigin="" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" crossorigin="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2e8c7052a4f71b42.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/framework-bbecb7d54330d002.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/main-12b4344bfd88e8af.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/_app-f30315cb8d51e1c4.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/664-8c5a4c082990d0a6.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/404-4fa995450413f980.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_buildManifest.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_ssgManifest.js" defer="" crossorigin=""></script></head><body><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><section class="h-full flex flex-col justify-center items-center"><main class=""><div class="text-center"><h1 class="text-4xl font-extrabold mb-6"> Oops! Page Not Found</h1><div class=""><div class="error-message"><p class="text-muted-foreground">The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.</p></div></div><div>Go to<!-- --> <a class="text-primary pointer underline" href="/">Home Page</a> </div></div></main></section><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="fixed z-50 right-0 bottom-0 p-4 transform transition-transform translate-x-full"><div class="bg-red-500 text-white p-4 rounded-md shadow-lg ring-1 ring-gray-800 backdrop-blur transition dark:bg-gray-800/90 dark:ring-white/10 dark:hover:ring-white/20 cursor-pointer"><p class="text-sm"><b>You seem to be offline</b><br/> Please check your internet connection.</p></div></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"6kU3ierzbdTB-lFn-By_G","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTML structure for the 404 error page appears to be correctly formatted and includes meta tags for SEO, social media, and responsive design. The links to static resources and scripts are present, and there is a script to handle theme color based on user preference or system settings. The content of the page is user-friendly, providing information about the error and a link to return to the home page. The page also includes a notification for when the user is offline, which is a good UX practice.
However, there are a couple of points to consider:
- The
meta
tag with the name attribute set to "Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain." seems to be incorrectly formatted. Thename
attribute should contain the descriptor of the content, such as "description", and thecontent
attribute should contain the actual content description. - The
link
tags for preloading CSS and thescript
tags for loading JavaScript are using absolute paths for thehref
andsrc
attributes. Ensure that these paths are correct and will resolve properly when the site is deployed. If the site is going to be deployed in a subdirectory or with a different domain, these paths may need to be adjusted.
- <meta name="Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain." content="Ten Gateway"/>
+ <meta name="description" content="Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain."/>
Committable suggestion
❗ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
<!DOCTYPE html><html lang="en"><head><title>Ten Gateway </title><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain." content="Ten Gateway"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:site" content="@obscuronet"/><meta name="twitter:title" content="Ten Gateway "/><meta name="twitter:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta name="twitter:image" content=""/><link rel="canonical" href="https://obscu.ro"/><meta property="og:locale" content="en_US"/><meta property="og:site_name" content="Ten Gateway"/><meta property="og:type" content="website"/><meta property="og:title" content="Ten Gateway "/><meta property="og:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta property="og:image" content=""/><meta property="og:url" content="https://obscu.ro"/><link rel="icon" href="/favicon.ico"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png"/><link rel="manifest" href="/manifest.json"/><meta name="next-head-count" content="20"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/319b66476ef61839.css" as="style" crossorigin=""/><link rel="stylesheet" href="/_next/static/css/319b66476ef61839.css" crossorigin="" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" crossorigin="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2e8c7052a4f71b42.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/framework-bbecb7d54330d002.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/main-12b4344bfd88e8af.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/_app-f30315cb8d51e1c4.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/664-8c5a4c082990d0a6.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/404-4fa995450413f980.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_buildManifest.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_ssgManifest.js" defer="" crossorigin=""></script></head><body><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><section class="h-full flex flex-col justify-center items-center"><main class=""><div class="text-center"><h1 class="text-4xl font-extrabold mb-6"> Oops! Page Not Found</h1><div class=""><div class="error-message"><p class="text-muted-foreground">The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.</p></div></div><div>Go to<!-- --> <a class="text-primary pointer underline" href="/">Home Page</a> </div></div></main></section><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="fixed z-50 right-0 bottom-0 p-4 transform transition-transform translate-x-full"><div class="bg-red-500 text-white p-4 rounded-md shadow-lg ring-1 ring-gray-800 backdrop-blur transition dark:bg-gray-800/90 dark:ring-white/10 dark:hover:ring-white/20 cursor-pointer"><p class="text-sm"><b>You seem to be offline</b><br/> Please check your internet connection.</p></div></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"6kU3ierzbdTB-lFn-By_G","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html> | |
<!DOCTYPE html><html lang="en"><head><title>Ten Gateway </title><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="description" content="Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain."/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:site" content="@obscuronet"/><meta name="twitter:title" content="Ten Gateway "/><meta name="twitter:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta name="twitter:image" content=""/><link rel="canonical" href="https://obscu.ro"/><meta property="og:locale" content="en_US"/><meta property="og:site_name" content="Ten Gateway"/><meta property="og:type" content="website"/><meta property="og:title" content="Ten Gateway "/><meta property="og:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta property="og:image" content=""/><meta property="og:url" content="https://obscu.ro"/><link rel="icon" href="/favicon.ico"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png"/><link rel="manifest" href="/manifest.json"/><meta name="next-head-count" content="20"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/319b66476ef61839.css" as="style" crossorigin=""/><link rel="stylesheet" href="/_next/static/css/319b66476ef61839.css" crossorigin="" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" crossorigin="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2e8c7052a4f71b42.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/framework-bbecb7d54330d002.js" defer="" crossorigin=""></script><script src="/__next/static/chunks/main-12b4344bfd88e8af.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/_app-f30315cb8d51e1c4.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/664-8c5a4c082990d0a6.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/404-4fa995450413f980.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_buildManifest.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_ssgManifest.js" defer="" crossorigin=""></script></head><body><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><section class="h-full flex flex-col justify-center items-center"><main class=""><div class="text-center"><h1 class="text-4xl font-extrabold mb-6"> Oops! Page Not Found</h1><div class=""><div class="error-message"><p class="text-muted-foreground">The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.</p></div></div><div>Go to<!-- --> <a class="text-primary pointer underline" href="/">Home Page</a> </div></div></main></section><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="fixed z-50 right-0 bottom-0 p-4 transform transition-transform translate-x-full"><div class="bg-red-500 text-white p-4 rounded-md shadow-lg ring-1 ring-gray-800 backdrop-blur transition dark:bg-gray-800/90 dark:ring-white/10 dark:hover:ring-white/20 cursor-pointer"><p class="text-sm"><b>You seem to be offline</b><br/> Please check your internet connection.</p></div></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"6kU3ierzbdTB-lFn-By_G","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html> |
if (switched === SWITCHED_CODE || (token && !isValidTokenFormat(token))) { | ||
const user = await joinTestnet(); | ||
const rpcUrls = [ | ||
`${getRPCFromUrl()}/${tenGatewayVersion}/?token=${user}`, | ||
`${tenGatewayAddress}/${tenGatewayVersion}/?token=${user}`, | ||
]; | ||
await addNetworkToMetaMask(rpcUrls); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a more specific error type instead of any
for better type safety in TypeScript.
- } catch (error: any) {
+ } catch (error) {
Committable suggestion
❗ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if (switched === SWITCHED_CODE || (token && !isValidTokenFormat(token))) { | |
const user = await joinTestnet(); | |
const rpcUrls = [ | |
`${getRPCFromUrl()}/${tenGatewayVersion}/?token=${user}`, | |
`${tenGatewayAddress}/${tenGatewayVersion}/?token=${user}`, | |
]; | |
await addNetworkToMetaMask(rpcUrls); | |
} | |
if (switched === SWITCHED_CODE || (token && !isValidTokenFormat(token))) { | |
const user = await joinTestnet(); | |
const rpcUrls = [ | |
`${tenGatewayAddress}/${tenGatewayVersion}/?token=${user}`, | |
]; | |
await addNetworkToMetaMask(rpcUrls); | |
} |
WORKDIR /home/obscuro/go-obscuro/tools/walletextension/frontend | ||
RUN if [ "$TESTNET_TYPE" = "dev-testnet" ]; then \ | ||
echo "NEXT_PUBLIC_API_GATEWAY_URL=https://dev-testnet.obscu.ro" > .env; \ | ||
elif [ "$TESTNET_TYPE" = "uat-testnet" ]; then \ | ||
echo "NEXT_PUBLIC_API_GATEWAY_URL=https://uat-testnet.obscu.ro" > .env; \ | ||
elif [ "$TESTNET_TYPE" = "sepolia-testnet" ]; then \ | ||
echo "NEXT_PUBLIC_API_GATEWAY_URL=https://testnet.obscu.ro" > .env; \ | ||
else \ | ||
echo "NEXT_PUBLIC_API_GATEWAY_URL=http://127.0.0.1:3000" > .env; \ | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .env
file creation based on TESTNET_TYPE
is well-implemented. Ensure that this approach is scalable if additional environment variables are needed in the future.
@@ -0,0 +1 @@ | |||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[823],{2653:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/[id]",function(){return s(7130)}])},7988:function(e,t,s){"use strict";s.r(t),s.d(t,{Custom404Error:function(){return Custom404Error}});var r=s(5893),n=s(6929);function Custom404Error(e){let{customPageTitle:t,showRedirectText:s,redirectText:a,isFullWidth:i,message:o,showMessage:c=!0,redirectLink:l,children:u}=e;return(0,r.jsx)(n.default,{heading:" ".concat(t||"Oops! Page"," Not Found"),statusText:"We can't seem to find the ".concat(t||"page"," you're looking for."),statusCode:404,showRedirectText:s,redirectText:a||"Home Page",message:o||"The ".concat(t||"page"," you are looking for might have been removed, had its name changed, or is temporarily unavailable."),isFullWidth:i,showMessage:c,redirectLink:l,children:u})}t.default=Custom404Error},6929:function(e,t,s){"use strict";s.r(t),s.d(t,{CustomError:function(){return CustomError}});var r=s(5893);s(7294);var n=s(2918),a=s.n(n),i=s(1664),o=s.n(i);function ErrorMessage(e){let{statusText:t,message:s,showMessage:n,showStatusText:a}=e;return(0,r.jsxs)("div",{className:"error-message",children:[a&&(0,r.jsx)("h3",{children:t}),s&&n&&(0,r.jsx)("p",{className:"text-muted-foreground",children:s})]})}function CustomError(e){let{showRedirectText:t=!0,heading:s="Oops! Something went wrong.",statusText:n="500",message:a="We're experiencing technical difficulties. Please try again later.",redirectText:i="Home Page",isFullWidth:c,err:l,showMessage:u=!0,showStatusText:d,statusCode:m,isModal:x,redirectLink:h="/",children:f,...g}=e;return(0,r.jsx)("section",{className:"h-full flex flex-col justify-center items-center",...g,children:(0,r.jsx)("main",{className:c?"max-w-full":"",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("h1",{className:"text-4xl font-extrabold mb-6",children:s}),(0,r.jsx)("div",{className:c?"w-full":"",children:(0,r.jsx)(ErrorMessage,{showStatusText:d,showMessage:u,message:a,statusText:n})}),t&&(0,r.jsxs)("div",{children:["Go to"," ",(0,r.jsx)(o(),{href:h,passHref:!0,className:"text-primary pointer underline",children:i})," "]}),f]})})})}CustomError.getInitialProps=async e=>{let{res:t,err:s}=e,r=t?t.statusCode:(null==s?void 0:s.statusCode)||404,n=await a().getInitialProps({res:t,err:s});return n.statusCode=r,r<500?n:{...n,statusCode:r}},t.default=CustomError},7130:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return _id_}});var r=s(5893),n=s(995),a=s(7294),spinner=()=>(0,r.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,r.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-primary"})}),i=s(7789),o=s(1163),c=s(7988),l=s(3474),u=s(3021),_id_=()=>{let{query:e}=(0,o.useRouter)(),{id:t}=e,[s,d]=a.useState({}),[m,x]=a.useState(!1),getDocument=async()=>{x(!0);try{let e=await fetch("/docs/".concat(t,".json")),s=await e.json(),r={title:s.title,subHeading:s.subHeading,content:s.content.map(e=>({heading:e.heading,content:e.content.map(e=>e.replace(/siteMetadata.email/g,i.F.email))}))};d(r)}catch(e){(0,l.CF)(u.p.DESTRUCTIVE,"Error fetching document")}finally{x(!1)}};return a.useEffect(()=>{t&&getDocument()},[t]),(0,r.jsx)(n.Z,{children:(0,r.jsx)("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-16",children:m?(0,r.jsx)(spinner,{}):s.title?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mb-8 text-center",children:[(0,r.jsx)("h1",{className:"text-4xl font-extrabold mb-6",children:s.title}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:s.subHeading})]}),(0,r.jsx)("div",{className:"prose prose-lg prose-primary",children:s.content&&s.content.map((e,t)=>(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h2",{className:"mb-2",children:e.heading}),e.content&&e.content.map((e,t)=>(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:e}},t))]},t))})]}):(0,r.jsx)(c.default,{customPageTitle:"Document"})})})}},2918:function(e,t,s){e.exports=s(6908)}},function(e){e.O(0,[409,664,394,995,774,888,179],function(){return e(e.s=2653)}),_N_E=e.O()}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of dangerouslySetInnerHTML
within the _id_
function to render content could pose a security risk if the content is not properly sanitized. It's crucial to ensure that any dynamic content rendered in this way has been sanitized to prevent cross-site scripting (XSS) attacks.
@@ -0,0 +1 @@ | |||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[573],{698:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/500",function(){return t(630)}])},630:function(e,r,t){"use strict";t.r(r);var s=t(5893),n=t(6929);function Custom500Error(e){let{customPageTitle:r,message:t,showRedirectText:i,redirectText:a,err:o,redirectLink:c,children:l}=e;return(0,s.jsx)(n.default,{heading:"Oops! Something went wrong.",message:t||"We're experiencing technical difficulties. Please try again later.",statusText:r||"An Error occured",statusCode:500,showRedirectText:i||!0,redirectText:a||"Home Page",err:o,redirectLink:c,children:l})}r.default=Custom500Error},6929:function(e,r,t){"use strict";t.r(r),t.d(r,{CustomError:function(){return CustomError}});var s=t(5893);t(7294);var n=t(2918),i=t.n(n),a=t(1664),o=t.n(a);function ErrorMessage(e){let{statusText:r,message:t,showMessage:n,showStatusText:i}=e;return(0,s.jsxs)("div",{className:"error-message",children:[i&&(0,s.jsx)("h3",{children:r}),t&&n&&(0,s.jsx)("p",{className:"text-muted-foreground",children:t})]})}function CustomError(e){let{showRedirectText:r=!0,heading:t="Oops! Something went wrong.",statusText:n="500",message:i="We're experiencing technical difficulties. Please try again later.",redirectText:a="Home Page",isFullWidth:c,err:l,showMessage:u=!0,showStatusText:d,statusCode:f,isModal:x,redirectLink:m="/",children:h,...g}=e;return(0,s.jsx)("section",{className:"h-full flex flex-col justify-center items-center",...g,children:(0,s.jsx)("main",{className:c?"max-w-full":"",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-4xl font-extrabold mb-6",children:t}),(0,s.jsx)("div",{className:c?"w-full":"",children:(0,s.jsx)(ErrorMessage,{showStatusText:d,showMessage:u,message:i,statusText:n})}),r&&(0,s.jsxs)("div",{children:["Go to"," ",(0,s.jsx)(o(),{href:m,passHref:!0,className:"text-primary pointer underline",children:a})," "]}),h]})})})}CustomError.getInitialProps=async e=>{let{res:r,err:t}=e,s=r?r.statusCode:(null==t?void 0:t.statusCode)||404,n=await i().getInitialProps({res:r,err:t});return n.statusCode=s,s<500?n:{...n,statusCode:s}},r.default=CustomError},2918:function(e,r,t){e.exports=t(6908)}},function(e){e.O(0,[664,774,888,179],function(){return e(e.s=698)}),_N_E=e.O()}]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code for the custom 500 error page appears to be correctly implemented and follows the standard Next.js pattern for error pages. Ensure that the CustomError
component's getInitialProps
method aligns with the latest Next.js best practices for error handling, especially if there are newer methods recommended over getInitialProps
.
panic(fmt.Errorf("could not serve static files. Cause: %w", err).Error()) | ||
} | ||
serveMux.Handle(common.PathObscuroGateway, http.StripPrefix(common.PathObscuroGateway, http.FileServer(http.FS(noPrefixStaticFilesOG)))) | ||
serveMux.Handle(common.PathObscuroGateway, http.StripPrefix(common.PathObscuroGateway, http.FileServer(http.FS(noPrefixStaticFiles)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static files are now served at the common.PathObscuroGateway
path, which should align with the updated frontend paths for the gateway backend URLs. Ensure that common.PathObscuroGateway
is correctly defined and that the frontend expects assets to be served from this path.
The verification script did not find a definition for common.PathObscuroGateway
, which is critical for serving static files at the updated path. Please ensure this variable is correctly defined and accessible where needed.
common.PathObscuroGateway
appears to be undefined, which is necessary for the updated static file serving path inserver.go
. Please define this variable or confirm its existence and scope.
export async function isTenChain() { | ||
let currentChain = await ethereum.request({ | ||
method: "eth_chainId", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isTenChain
function makes an asynchronous call without error handling, which could lead to unhandled promise rejections. Consider adding a try-catch block to handle potential errors gracefully.
export async function isTenChain() {
try {
let currentChain = await ethereum.request({
method: "eth_chainId",
});
return currentChain === tenChainIDHex;
} catch (error) {
console.error('Error fetching chain ID:', error);
return false; // or handle the error as appropriate for your application
}
}
The ethereum
object is assumed to be present on the window
object without any checks. This could lead to errors if window.ethereum
is undefined. It would be safer to check if ethereum
is available before making the request.
export async function isTenChain() {
if (typeof ethereum === 'undefined') {
console.error('Ethereum object not found');
return false;
}
// ... rest of the function
}
<!DOCTYPE html><html lang="en"><head><title>Ten Gateway </title><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="Ten, a decentralized Layer 2 Rollup protocol designed to hyper-scale and encrypt the Ethereum blockchain." content="Ten Gateway"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:site" content="@obscuronet"/><meta name="twitter:title" content="Ten Gateway "/><meta name="twitter:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta name="twitter:image" content=""/><link rel="canonical" href="https://obscu.ro"/><meta property="og:locale" content="en_US"/><meta property="og:site_name" content="Ten Gateway"/><meta property="og:type" content="website"/><meta property="og:title" content="Ten Gateway "/><meta property="og:description" content="Ten, a decentralized Ethereum Layer 2 Rollup protocol designed to hyper-scale, encrypt and prevent negative MEV on Ethereum."/><meta property="og:image" content=""/><meta property="og:url" content="https://obscu.ro"/><link rel="icon" href="/favicon.ico"/><link rel="apple-touch-icon" href="/icons/apple-touch-icon.png"/><link rel="manifest" href="/manifest.json"/><meta name="next-head-count" content="20"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/319b66476ef61839.css" as="style" crossorigin=""/><link rel="stylesheet" href="/_next/static/css/319b66476ef61839.css" crossorigin="" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" crossorigin="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-2e8c7052a4f71b42.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/framework-bbecb7d54330d002.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/main-12b4344bfd88e8af.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/_app-f30315cb8d51e1c4.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/ee9ce975-fcbd1d46c64023aa.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/664-8c5a4c082990d0a6.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/394-7efaf349d313593f.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/752-8e4e922b39786da1.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/995-3bfbdf9e32a6b7ea.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/index-3c93b410b3c75b9e.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_buildManifest.js" defer="" crossorigin=""></script><script src="/_next/static/6kU3ierzbdTB-lFn-By_G/_ssgManifest.js" defer="" crossorigin=""></script></head><body><div id="__next"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="bg-background"><div class="flex flex-col min-h-screen max-w-[1400px] mx-auto px-4"><div class="border-b"><div class="flex h-16 justify-between items-center px-4"><a href="/"><h1 class="text-40">TEN.</h1></a><div class="hidden md:flex items-center space-x-4"><nav class="flex items-center lg:space-x-6 mx-6"></nav><div class="flex items-center space-x-4"><button class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 w-10 p-1" type="button" id="radix-:R6iq6:" aria-haspopup="menu" aria-expanded="false" data-state="closed"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span class="sr-only">Toggle theme</span></button><button class="inline-flex items-center justify-center rounded-md ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2 text-sm font-medium leading-none"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1"><path d="M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg>Connect</button></div></div><div class="flex items-center space-x-4 md:hidden"><div class="relative"><button class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 w-10 p-1" type="button" id="radix-:R1qq6:" aria-haspopup="menu" aria-expanded="false" data-state="closed"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg><span class="sr-only">Toggle theme</span></button><button class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-transparent outline-none h-10 px-4 py-2 text-muted-foreground hover:text-primary transition-colors"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></button></div></div></div></div><div class="flex-1 space-y-4 py-6"><div class="flex items-center justify-center w-full h-full"><div class="w-[800px] mx-auto"><div class="animate-pulse rounded-md bg-muted h-[400px]"></div></div></div></div><div class="border-t px-2"><div class="flex h-16 items-center px-4"><div class="flex-1 flex items-center space-x-4"><a href="https://github.com/obscuronet" aria-label="GitHub" class="text-muted-foreground hover:text-primary transition-colors"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></a><a href="https://twitter.com/obscuronet" aria-label="Twitter" class="text-muted-foreground hover:text-primary transition-colors"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.23336 4.69629C7.23336 2.96884 8.63335 1.56857 10.36 1.56857C11.3736 1.56857 12.183 2.04804 12.7254 2.74385C13.3079 2.62467 13.8557 2.40913 14.3513 2.11508C14.1559 2.72598 13.7424 3.2396 13.2033 3.56463C13.2038 3.56568 13.2042 3.56674 13.2047 3.56779C13.7334 3.50361 14.2364 3.36302 14.7048 3.15546L14.7037 3.15715C14.3667 3.66183 13.9431 4.10736 13.4561 4.47034C13.4823 4.64672 13.4956 4.82427 13.4956 5.00079C13.4956 8.6871 10.6873 12.9746 5.52122 12.9746C3.93906 12.9746 2.46544 12.511 1.22505 11.7152C0.992632 11.5661 0.925108 11.2568 1.07423 11.0244C1.0874 11.0038 1.10183 10.9846 1.11734 10.9666C1.20582 10.8202 1.37438 10.7309 1.5554 10.7522C2.47066 10.8601 3.38568 10.7485 4.19219 10.3962C3.39226 10.0434 2.77129 9.35975 2.50204 8.51974C2.45359 8.3686 2.48835 8.20311 2.59351 8.08422C2.59716 8.0801 2.60087 8.07606 2.60464 8.0721C1.96391 7.50819 1.55973 6.68208 1.55973 5.76143V5.72759C1.55973 5.56814 1.64411 5.42059 1.78155 5.33974C1.82671 5.31317 1.87537 5.29511 1.92532 5.28558C1.70549 4.86154 1.58116 4.37984 1.58116 3.86958C1.58116 3.40165 1.58384 2.81192 1.91332 2.28081C1.98718 2.16175 2.10758 2.08915 2.2364 2.07195C2.42588 2.01237 2.64087 2.06969 2.77406 2.23302C3.86536 3.57126 5.44066 4.49583 7.23366 4.73961L7.23336 4.69629ZM5.52122 11.9746C4.73387 11.9746 3.97781 11.8435 3.27248 11.6023C4.13012 11.4538 4.95307 11.1159 5.66218 10.5602C5.81211 10.4427 5.87182 10.2435 5.81126 10.0629C5.7507 9.88234 5.583 9.75943 5.39255 9.75607C4.68968 9.74366 4.06712 9.39716 3.67793 8.86845C3.86828 8.85306 4.05428 8.82039 4.23445 8.77167C4.43603 8.71716 4.57363 8.53114 4.56674 8.32243C4.55985 8.11372 4.41029 7.93718 4.20555 7.89607C3.42694 7.73977 2.79883 7.16764 2.56169 6.42174C2.76255 6.47025 2.97102 6.4991 3.18482 6.5061C3.38563 6.51267 3.56646 6.38533 3.62795 6.19405C3.68943 6.00277 3.61666 5.79391 3.44963 5.68224C2.86523 5.29155 2.48116 4.62464 2.48116 3.86958C2.48116 3.70213 2.48352 3.55268 2.49355 3.41719C3.85115 4.79913 5.70873 5.68931 7.77588 5.79338C7.93225 5.80126 8.08328 5.73543 8.18395 5.61553C8.28463 5.49562 8.32332 5.33548 8.28851 5.18284C8.25255 5.02517 8.23336 4.86284 8.23336 4.69629C8.23336 3.52085 9.18591 2.56857 10.36 2.56857C11.5943 2.56857 12.4956 3.71208 12.4956 5.00079C12.4956 8.25709 10.0202 11.9746 5.52122 11.9746Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></a><a href="https://discord.gg/2JQ2Z3r" aria-label="Discord" class="text-muted-foreground hover:text-primary transition-colors"><svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.07451 1.82584C5.03267 1.81926 4.99014 1.81825 4.94803 1.82284C4.10683 1.91446 2.82673 2.36828 2.07115 2.77808C2.02106 2.80525 1.97621 2.84112 1.93869 2.88402C1.62502 3.24266 1.34046 3.82836 1.11706 4.38186C0.887447 4.95076 0.697293 5.55032 0.588937 5.98354C0.236232 7.39369 0.042502 9.08728 0.0174948 10.6925C0.0162429 10.7729 0.0351883 10.8523 0.0725931 10.9234C0.373679 11.496 1.02015 12.027 1.66809 12.4152C2.32332 12.8078 3.08732 13.1182 3.70385 13.1778C3.85335 13.1922 4.00098 13.1358 4.10282 13.0255C4.2572 12.8581 4.5193 12.4676 4.71745 12.1643C4.80739 12.0267 4.89157 11.8953 4.95845 11.7901C5.62023 11.9106 6.45043 11.9801 7.50002 11.9801C8.54844 11.9801 9.37796 11.9107 10.0394 11.7905C10.1062 11.8957 10.1903 12.0269 10.2801 12.1643C10.4783 12.4676 10.7404 12.8581 10.8947 13.0255C10.9966 13.1358 11.1442 13.1922 11.2937 13.1778C11.9102 13.1182 12.6742 12.8078 13.3295 12.4152C13.9774 12.027 14.6239 11.496 14.925 10.9234C14.9624 10.8523 14.9813 10.7729 14.9801 10.6925C14.9551 9.08728 14.7613 7.39369 14.4086 5.98354C14.3003 5.55032 14.1101 4.95076 13.8805 4.38186C13.6571 3.82836 13.3725 3.24266 13.0589 2.88402C13.0214 2.84112 12.9765 2.80525 12.9264 2.77808C12.1708 2.36828 10.8907 1.91446 10.0495 1.82284C10.0074 1.81825 9.96489 1.81926 9.92305 1.82584C9.71676 1.85825 9.5391 1.96458 9.40809 2.06355C9.26977 2.16804 9.1413 2.29668 9.0304 2.42682C8.86968 2.61544 8.71437 2.84488 8.61428 3.06225C8.27237 3.03501 7.90138 3.02 7.5 3.02C7.0977 3.02 6.72593 3.03508 6.38337 3.06244C6.28328 2.84501 6.12792 2.61549 5.96716 2.42682C5.85626 2.29668 5.72778 2.16804 5.58947 2.06355C5.45846 1.96458 5.2808 1.85825 5.07451 1.82584ZM11.0181 11.5382C11.0395 11.5713 11.0615 11.6051 11.0838 11.6392C11.2169 11.843 11.3487 12.0385 11.4508 12.1809C11.8475 12.0916 12.352 11.8818 12.8361 11.5917C13.3795 11.2661 13.8098 10.8918 14.0177 10.5739C13.9852 9.06758 13.7993 7.50369 13.4773 6.21648C13.38 5.82759 13.2038 5.27021 12.9903 4.74117C12.7893 4.24326 12.5753 3.82162 12.388 3.5792C11.7376 3.24219 10.7129 2.88582 10.0454 2.78987C10.0308 2.79839 10.0113 2.81102 9.98675 2.82955C9.91863 2.881 9.84018 2.95666 9.76111 3.04945C9.71959 3.09817 9.68166 3.1471 9.64768 3.19449C9.953 3.25031 10.2253 3.3171 10.4662 3.39123C11.1499 3.6016 11.6428 3.89039 11.884 4.212C12.0431 4.42408 12.0001 4.72494 11.788 4.884C11.5759 5.04306 11.2751 5.00008 11.116 4.788C11.0572 4.70961 10.8001 4.4984 10.1838 4.30877C9.58933 4.12585 8.71356 3.98 7.5 3.98C6.28644 3.98 5.41067 4.12585 4.81616 4.30877C4.19988 4.4984 3.94279 4.70961 3.884 4.788C3.72494 5.00008 3.42408 5.04306 3.212 4.884C2.99992 4.72494 2.95694 4.42408 3.116 4.212C3.35721 3.89039 3.85011 3.6016 4.53383 3.39123C4.77418 3.31727 5.04571 3.25062 5.35016 3.19488C5.31611 3.14738 5.27808 3.09831 5.23645 3.04945C5.15738 2.95666 5.07893 2.881 5.01081 2.82955C4.98628 2.81102 4.96674 2.79839 4.95217 2.78987C4.28464 2.88582 3.25999 3.24219 2.60954 3.5792C2.42226 3.82162 2.20825 4.24326 2.00729 4.74117C1.79376 5.27021 1.61752 5.82759 1.52025 6.21648C1.19829 7.50369 1.01236 9.06758 0.97986 10.5739C1.18772 10.8918 1.61807 11.2661 2.16148 11.5917C2.64557 11.8818 3.15003 12.0916 3.5468 12.1809C3.64885 12.0385 3.78065 11.843 3.9138 11.6392C3.93626 11.6048 3.95838 11.5708 3.97996 11.5375C3.19521 11.2591 2.77361 10.8758 2.50064 10.4664C2.35359 10.2458 2.4132 9.94778 2.63377 9.80074C2.85435 9.65369 3.15236 9.71329 3.29941 9.93387C3.56077 10.3259 4.24355 11.0201 7.50002 11.0201C10.7565 11.0201 11.4392 10.326 11.7006 9.93386C11.8477 9.71329 12.1457 9.65369 12.3663 9.80074C12.5869 9.94779 12.6465 10.2458 12.4994 10.4664C12.2262 10.8762 11.8041 11.2598 11.0181 11.5382ZM4.08049 7.01221C4.32412 6.74984 4.65476 6.60162 5.00007 6.59998C5.34538 6.60162 5.67603 6.74984 5.91966 7.01221C6.16329 7.27459 6.30007 7.62974 6.30007 7.99998C6.30007 8.37021 6.16329 8.72536 5.91966 8.98774C5.67603 9.25011 5.34538 9.39833 5.00007 9.39998C4.65476 9.39833 4.32412 9.25011 4.08049 8.98774C3.83685 8.72536 3.70007 8.37021 3.70007 7.99998C3.70007 7.62974 3.83685 7.27459 4.08049 7.01221ZM9.99885 6.59998C9.65354 6.60162 9.3229 6.74984 9.07926 7.01221C8.83563 7.27459 8.69885 7.62974 8.69885 7.99998C8.69885 8.37021 8.83563 8.72536 9.07926 8.98774C9.3229 9.25011 9.65354 9.39833 9.99885 9.39998C10.3442 9.39833 10.6748 9.25011 10.9184 8.98774C11.1621 8.72536 11.2989 8.37021 11.2989 7.99998C11.2989 7.62974 11.1621 7.27459 10.9184 7.01221C10.6748 6.74984 10.3442 6.60162 9.99885 6.59998Z" fill="currentColor"></path></svg></a></div><div class="flex items-center space-x-4"><a class="text-sm font-medium text-muted-foreground transition-colors hover:text-primary" href="/docs/privacy">Privacy</a><a class="text-sm font-medium text-muted-foreground transition-colors hover:text-primary" href="/docs/terms">Terms</a></div></div></div></div></div><div role="region" aria-label="Notifications (F8)" tabindex="-1" style="pointer-events:none"><ol tabindex="-1" class="fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]"></ol></div><div class="fixed z-50 right-0 bottom-0 p-4 transform transition-transform translate-x-full"><div class="bg-red-500 text-white p-4 rounded-md shadow-lg ring-1 ring-gray-800 backdrop-blur transition dark:bg-gray-800/90 dark:ring-white/10 dark:hover:ring-white/20 cursor-pointer"><p class="text-sm"><b>You seem to be offline</b><br/> Please check your internet connection.</p></div></div></div><script id="__NEXT_DATA__" type="application/json" crossorigin="">{"props":{"pageProps":{}},"page":"/","query":{},"buildId":"6kU3ierzbdTB-lFn-By_G","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 NOTE
Codebase verification is a beta feature.
The HTML structure and meta tags in tools/walletextension/api/static/index.html
have been updated to reflect the rebranding to "Ten Gateway". However, a reference to "Obscuro wallet extension" still exists in tools/walletextension/main/main.go
. This should be updated to maintain consistency across the codebase.
- Update the reference in
tools/walletextension/main/main.go
to match the new branding.
Analysis chain
The HTML structure and meta tags have been updated to reflect the rebranding to "Ten Gateway". Ensure that all references to the old brand "Obscuro wallet extension" have been updated across the entire codebase.
💡 NOTE
Codebase verification is a beta feature.
The verification process has confirmed the presence of most linked resources in the tools/walletextension/api/static
directory. However, the manifest.json
file and the pages/_app-f30315cb8d51e1c4.js
script were not found. The apple-touch-icon.png
exists but is located in the docs
directory, which may not be the correct path for the frontend application.
Final review comment:
The verification process has found that most resources are correctly placed and accessible. However, there are a few issues that need to be addressed:
- The
manifest.json
file is missing. - The
pages/_app-f30315cb8d51e1c4.js
script is not found. - The
apple-touch-icon.png
is located in thedocs
directory, which may not be the intended location for the frontend application.
Please ensure that these resources are correctly located and accessible from the expected paths.
Analysis chain
Verify that all the linked resources (stylesheets, scripts, icons, manifest, etc.) are correctly updated and accessible at their new paths.
9c96ac2
to
14a0570
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (8)
- tools/walletextension/api/static/favicon-32x32.png
- tools/walletextension/api/static/favicon.ico
- tools/walletextension/api/staticOG/MetaMaskIcon.png
- tools/walletextension/api/staticOG/Metamask Network Icon.png
- tools/walletextension/api/staticOG/check.svg
- tools/walletextension/api/staticOG/copy.svg
- tools/walletextension/api/staticOG/favicon-32x32.png
- tools/walletextension/api/staticOG/ten.svg
Files selected for processing (11)
- .github/workflows/manual-deploy-obscuro-gateway.yml (1 hunks)
- tools/walletextension/Dockerfile (2 hunks)
- tools/walletextension/README.md (1 hunks)
- tools/walletextension/api/server.go (2 hunks)
- tools/walletextension/frontend/next.config.js (1 hunks)
- tools/walletextension/frontend/src/api/gateway.ts (5 hunks)
- tools/walletextension/frontend/src/components/modules/common/network-status.tsx (1 hunks)
- tools/walletextension/frontend/src/lib/constants.ts (1 hunks)
- tools/walletextension/frontend/src/lib/utils.ts (1 hunks)
- tools/walletextension/frontend/src/services/useGatewayService.ts (2 hunks)
- tools/walletextension/main/main.go (1 hunks)
Files skipped from review due to trivial changes (4)
- tools/walletextension/Dockerfile
- tools/walletextension/README.md
- tools/walletextension/api/server.go
- tools/walletextension/main/main.go
Additional comments: 15
.github/workflows/manual-deploy-obscuro-gateway.yml (1)
- 53-57: The addition of the
TESTNET_TYPE
build argument to the Docker build command is correctly implemented and aligns with the PR objectives to include a testnet parameter as a build parameter for Docker.tools/walletextension/frontend/next.config.js (1)
- 4-5: The configuration changes to set the output directory and distribution directory are correct and align with the PR objectives to modify the build process for the frontend.
tools/walletextension/frontend/src/api/gateway.ts (6)
5-5: The import of
tenGatewayAddress
from../lib/constants
is correct and aligns with the PR objectives.10-10: The URL in
fetchVersion
is correctly constructed by prependingtenGatewayAddress
to the existing URL.20-20: The URL in
accountIsAuthenticated
is correctly constructed by prependingtenGatewayAddress
to the existing URL.37-37: The URL in
authenticateUser
is correctly constructed by prependingtenGatewayAddress
to the existing URL.48-48: The URL in
revokeAccountsApi
is correctly constructed by prependingtenGatewayAddress
to the existing URL.58-58: The URL in
joinTestnet
is correctly constructed by prependingtenGatewayAddress
to the existing URL.tools/walletextension/frontend/src/components/modules/common/network-status.tsx (2)
11-11: The
isOnline
state is hardcoded totrue
, which may not reflect the actual network status on initial render. If this is intentional, for example, to show an optimistic online status before the actual check, it's acceptable. Otherwise, consider initializing withnavigator.onLine
to reflect the actual status.13-14: The
useEffect
hook correctly sets up event listeners to updateisOnline
based on the network status, ensuring the component reflects changes in network connectivity after the initial render.tools/walletextension/frontend/src/lib/constants.ts (2)
1-1: The introduction of a fallback URL for
tenGatewayAddress
is a good practice for resilience. Ensure that the default URL (http://127.0.0.1:3000
) is appropriate for all environments where this code might run, including production.1-5: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [3-34]
The rest of the constants in the file remain unchanged and are correctly exported. This ensures that other parts of the application that rely on these constants will continue to function as expected.
tools/walletextension/frontend/src/services/useGatewayService.ts (3)
5-6: The changes to the imports are consistent with the PR objectives and the AI-generated summary, which indicates a shift in how RPC URLs are handled by using
tenGatewayAddress
instead of dynamic URL construction.45-51: The previous comment about using a more specific error type instead of
any
is still valid. It's a good practice in TypeScript to avoid usingany
for error types to maintain type safety.48-48: The construction of the
rpcUrls
array usingtenGatewayAddress
andtenGatewayVersion
is consistent with the PR objectives and the AI-generated summary, which indicates a shift in how RPC URLs are handled.
# build the contract deployer exec | ||
# Create .env file for frontend | ||
WORKDIR /home/obscuro/go-obscuro/tools/walletextension/frontend | ||
RUN if [ "$TESTNET_TYPE" = "dev-testnet" ]; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if-else block is pretty gross but not a priority haha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
We need to look into the manual appending of baseURL; i.e. not why the baseURL isn't being appended to the request dynamically. I will have to create a separate issue to look into this.
Why this change is needed
To deploy new version of frontend developed by Jennie on testnets and locally.
What changes were made as part of this PR
PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks