Skip to content

Integrate points#7

Merged
luu-alex merged 21 commits intoprodfrom
integrate-points
Mar 25, 2026
Merged

Integrate points#7
luu-alex merged 21 commits intoprodfrom
integrate-points

Conversation

@luu-alex
Copy link
Copy Markdown

No description provided.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 25, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
hyperterminal aa277cc Mar 25 2026, 03:01 AM

@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 significantly overhauls the application's authentication mechanism by integrating Privy, providing a more robust and feature-rich wallet connection experience. Alongside this core change, it introduces new functionalities like a points system and a testnet faucet, enhancing user engagement and utility. The updates span across various layers of the application, from environment configuration and dependencies to core UI components and trading logic, ensuring a seamless transition and improved user interaction.

Highlights

  • Privy Integration: The wallet authentication system has been migrated to Privy, replacing the previous Wagmi-based connection flow. This includes new Privy-specific dependencies, configuration, and a synchronization hook to keep Privy and Wagmi states aligned.
  • New Features: Hypermiles Points & Faucet: Two new user-facing features have been introduced: 'Hypermiles' for tracking points and a 'Faucet' for claiming USDH on testnet. Both features are accessible via dedicated modals and integrated into the top navigation and account panels.
  • UI/UX Enhancements: The user interface has been updated to reflect the new authentication flow and integrate the new features. This includes changes to the top navigation, user menu, and mobile account/trade views, along with the removal of the old WalletDialog component.
  • Build & Configuration Updates: The project's build configuration (package.json, vite.config.ts) has been updated to support Privy, Wagmi integration with Privy, and Node.js polyfills. New environment variables for Privy and the Hypermiles API have been added.
  • Unified Account Logic: The logic for deriving available balances and maximum trade sizes has been updated to better support unified accounts, where spot stablecoins (USDC/USDH) can serve as collateral for perp markets, especially when the perp clearinghouse shows zero balance.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/ci.yml
    • .github/workflows/claude-code-review.yml
    • .github/workflows/i18n-check.yml
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.

Copy link
Copy Markdown

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

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 integrates Privy for wallet authentication, replacing the previous Wagmi-based wallet connection and removing the custom WalletDialog. It introduces new features including a Faucet modal for testnet USDH claims and a Hypermiles points modal with referral functionality. The changes also involve updating dependencies, refactoring several components to use Privy's authentication state, and adjusting UI elements like the top navigation and account panels to support the new modals and conditional display based on testnet status. A minor issue was identified in the use-token-selector.ts file where the highlight index does not reset correctly when certain filters change, which could lead to a desynchronized UI state.

setHighlightedIndex(0);
}
}, [deferredSearch, scope, subcategory]);
}, [open]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While changing the dependency array to just [open] improves the user experience by not resetting the highlight on every search keystroke, it introduces an issue where the highlight does not reset when the scope or subcategory filters change. This can lead to the highlightedIndex being out of sync with the filtered list of markets.

To fix this, the effect should run when scope or subcategory change, but not on open (as another useEffect handles initialization) or deferredSearch.

Suggested change
}, [open]);
}, [scope, subcategory]);

@luu-alex luu-alex merged commit d619088 into prod Mar 25, 2026
3 of 4 checks passed
@priom priom deleted the integrate-points 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