Skip to content

Fix/excessive contract handling#631

Open
yaroslav-dyn wants to merge 6 commits intosoroswap:mainfrom
yaroslav-dyn:fix/excessive-contract-handling
Open

Fix/excessive contract handling#631
yaroslav-dyn wants to merge 6 commits intosoroswap:mainfrom
yaroslav-dyn:fix/excessive-contract-handling

Conversation

@yaroslav-dyn
Copy link
Contributor

@yaroslav-dyn yaroslav-dyn commented May 14, 2025

Stage 1:

Fix excessive re-rendering and reloading of SwapComponent and Child.

SwapComponent:
Rewrite 'useDerivedSwapInfo' hook to a service type and use of useEffect directly from component.

CurrencyBalance:
Decompose component view for XLM/OTHER tokens and minified requests.

Expected result:
Application doesn't blink on focus, SwapDetailsDropdown doesn't close every time swap parameters (input/output values, currencies, wallet, etc.) change.

   Re-write 'useDerivedSwapInfo' hook to a service type and use from useEffect directly from component.

CurrencyBalance:
   Decomposite component view for XLM/OTHER tokens and minifed requests.
@vercel
Copy link

vercel bot commented May 14, 2025

@yaroslav-dyn is attempting to deploy a commit to the PaltaLabs OU Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented May 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 2:00pm

@esteblock
Copy link
Member

  • If I turn off the SDEX, I get only undefined
Screencast.from.2025-05-26.13-10-28.webm

@yaroslav-dyn
Copy link
Contributor Author

  • If I turn off the SDEX, I get only undefined

Screencast.from.2025-05-26.13-10-28.webm

Got it. I'll fix.

@yaroslav-dyn
Copy link
Contributor Author

yaroslav-dyn commented May 27, 2025

  • If I turn off the SDEX, I get only undefined

Screencast.from.2025-05-26.13-10-28.webm

@esteblock Fixed in a last commit. Additionally the PR updated with current main branch.

@esteblock
Copy link
Member

Hello we still have errors
THe API is responding with a different path but you are still showing the same path as before
Uploading Screencast from 2025-05-28 15-29-35.webm…

  Pathes and best trade params if:
  NEXT_PUBLIC_DIRECT_PATH_ENABLED === true/false;
  NEXT_PUBLIC_AGGREGATOR_ENABLED_MAINNET === true/false;
  NEXT_PUBLIC_AGGREGATOR_ENABLED_TESTNET === true/false;
  Triggering different protocols.
@yaroslav-dyn
Copy link
Contributor Author

Hello we still have errors THe API is responding with a different path but you are still showing the same path as before Uploading Screencast from 2025-05-28 15-29-35.webm…

@esteblock Fixed:
Paths and best trade params if:
NEXT_PUBLIC_DIRECT_PATH_ENABLED === true/false;
NEXT_PUBLIC_AGGREGATOR_ENABLED_MAINNET === true/false;
NEXT_PUBLIC_AGGREGATOR_ENABLED_TESTNET === true/false;
Triggering different protocols.

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.

2 participants