Skip to content

Update colors - #5

Merged
luu-alex merged 3 commits into
add-privyfrom
update-colors
Mar 20, 2026
Merged

Update colors#5
luu-alex merged 3 commits into
add-privyfrom
update-colors

Conversation

@luu-alex

Copy link
Copy Markdown

No description provided.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 20, 2026

Copy link
Copy Markdown

Deploying hyperterminal with  Cloudflare Pages  Cloudflare Pages

Latest commit: b4d6d15
Status:🚫  Build failed.

View logs

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant refactoring to the application's wallet integration and user interface. It streamlines the top navigation by removing several less-used links, simplifying the overall UI. A major focus was on enhancing the interaction between Privy and Wagmi, particularly by refactoring how wallet clients are accessed and how chain switching is handled within trading components and Hyperliquid client creation. This includes preventing premature disconnections during wallet authentication and adding explicit support for Arbitrum Sepolia, expanding the application's compatibility. The changes aim to improve the robustness and user experience of wallet interactions while cleaning up the navigation. The PR title "Update colors" is a misnomer, as the primary changes are functional and structural.

Highlights

  • UI Navigation Streamlining: Several navigation links, including 'Spot', 'Builders', 'Vaults', 'Portfolio', 'Staking', and 'Leaderboard', were removed from the top navigation bar to simplify the user interface.
  • Enhanced Wallet Integration: The wallet connection and chain switching logic in MobileTradeView and TradePanel components were refactored, removing direct wagmi useWalletClient and useSwitchChain hooks for a more integrated approach.
  • Privy-Wagmi Sync Improvement: The usePrivyWagmiSync hook was updated to use useRef for authenticated and isConnected states, preventing unintended disconnections that could occur during the Privy wallet authentication handshake.
  • Hyperliquid Client Refactor: The useHyperliquidClients hook was modified to leverage Privy's useWallets for creating the ExchangeClient, incorporating custom logic for getAddresses, getChainId, and signTypedData that includes on-demand chain switching.
  • Arbitrum Sepolia Support: Support for Arbitrum Sepolia was extended by adding it to both the Privy and Wagmi configurations, increasing the application's chain compatibility.
  • Styling Adjustment: The text color for the contained accent button variant in the UI component library was updated from text-white to text-primary-text.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily refactors wallet interactions to use Privy's hooks more directly, moving away from wagmi's useWalletClient and useSwitchChain. This makes wallet operations, especially signing and chain switching, more robust. The changes also include adding support for the Arbitrum Sepolia testnet and a minor color theme update in the Button component, which seems to be what the PR title refers to.

The core logic change in useClients.ts to create a custom Hyperliquid exchange client using Privy's wallet object is well-implemented. The fix in usePrivyWagmiSync.ts to prevent race conditions during login is also a great improvement.

I have one suggestion in trade-panel.tsx to improve maintainability by removing now-obsolete properties from shared hooks, which would make the codebase cleaner after this refactoring.

Comment thread src/components/trade/tradebox/trade-panel.tsx Outdated
@luu-alex

Copy link
Copy Markdown
Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors wallet and chain management by integrating Privy's wallet handling more deeply, removing direct wagmi useWalletClient and useSwitchChain hooks from trade components. It introduces a usePrivyWagmiSync hook for consistent authentication state and adds support for Arbitrum Sepolia. Concurrently, several navigation items such as "Spot", "Builders", "Vaults", "Portfolio", "Staking", and "Leaderboard" have been removed from the top navigation and mobile trade view, along with associated validation logic and localization entries. A minor UI change updates the accent button text color.

@luu-alex
luu-alex merged commit 49dae5c into add-privy Mar 20, 2026
4 of 5 checks passed
@priom
priom deleted the update-colors branch March 31, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant