Skip to content

Conversation

foodaka
Copy link
Collaborator

@foodaka foodaka commented Aug 18, 2025

General Changes

  • Allows ability to auto set the network in the users wallet if they are on the wrong network

Developer Notes

Add any notes here that may be helpful for reviewers.


Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

Copy link

vercel bot commented Aug 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
interface Ready Ready Preview Comment Aug 19, 2025 3:44pm

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

AGMASO
AGMASO previously approved these changes Aug 19, 2025
Copy link
Collaborator

@AGMASO AGMASO left a comment

Choose a reason for hiding this comment

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

LGTM


// Attempt switch and handle completion
switchNetwork(chainId).finally(() => {
setIsAutoSwitching(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setIsAutoSwitching(false);
setIsAutoSwitching(false);
setHasAttemptedAutoSwitch(true);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added in fbd2729


// Auto-attempt network switch on mount
useEffect(() => {
if (autoSwitchOnMount && !hasAttemptedAutoSwitch) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (autoSwitchOnMount && !hasAttemptedAutoSwitch) {
if (autoSwitchOnMount && !hasAttemptedAutoSwitch && !isAutoSwitching) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added in fbd2729

funnel,
...event?.eventParams,
network: networkName,
automatic: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
automatic: true,
manual: false,

so we use the same prop

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added in fbd2729

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@foodaka foodaka merged commit 6fdfb96 into main Aug 19, 2025
20 of 21 checks passed
@foodaka foodaka deleted the feat/auto-switch-network branch August 19, 2025 16:42
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.

4 participants