Skip to content
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

fix: Roi crash when full range selected #6682

Conversation

memoyil
Copy link
Collaborator

@memoyil memoyil commented Apr 21, 2023

🤖 Generated by Copilot at 75c4cb4

Summary

🆕🎨📈

This pull request adds a new feature to the Add Liquidity V3 form that allows the user to select the full price range for the liquidity pool and see the corresponding return on investment. It modifies the RoiCalculator, usePriceRange, and Button components, as well as the V3FormView and AprCalculator views.

Sing, O Muse, of the cunning AprCalculator,
Who with skill and wisdom guides the liquidity seeker,
And of the valiant RoiCalculator, its faithful ally,
Who reveals the hidden profits of the full price range.

Walkthrough

  • Add fullRangeSelected prop to AprCalculator and RoiCalculator components to indicate full price range selection for liquidity pool (link, link, link, link)
  • Pass fullRangeSelected prop from AprCalculator to RoiCalculator and from RoiCalculator to usePriceRange hook (link, link, link)
  • Use fullRangeSelected prop to set initial state of fullRange variable in usePriceRange hook and update priceRangeInfo object in RoiCalculator component (link, link)
  • Modify styles of Button components for quick and custom price range actions in V3FormView component to improve alignment and spacing (link, link)

@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2023

⚠️ No Changeset found

Latest commit: 05043ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Apr 21, 2023

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

Name Status Preview Comments Updated (UTC)
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2023 11:56pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
aptos-web ⬜️ Ignored (Inspect) Visit Preview Jul 21, 2023 11:56pm
blog ⬜️ Ignored (Inspect) Visit Preview Jul 21, 2023 11:56pm
bridge ⬜️ Ignored (Inspect) Visit Preview Jul 21, 2023 11:56pm
uikit ⬜️ Ignored (Inspect) Visit Preview Jul 21, 2023 11:56pm

@vercel
Copy link

vercel bot commented Apr 21, 2023

@memoyil is attempting to deploy a commit to the PancakeSwap Team on Vercel.

A member of the Team first needs to authorize it.

@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 75c4cb4 to 605270d Compare April 22, 2023 07:30
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 605270d to bb7accf Compare April 22, 2023 08:46
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from bb7accf to 9f57a7c Compare April 24, 2023 08:38
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 9f57a7c to d796fa7 Compare April 28, 2023 13:51
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from d796fa7 to cbb2be7 Compare May 3, 2023 06:11
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from cbb2be7 to 1eca370 Compare May 8, 2023 09:00
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 1eca370 to 49a84d8 Compare May 15, 2023 14:42
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 49a84d8 to caaa1be Compare May 16, 2023 07:35
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from caaa1be to 4504843 Compare May 19, 2023 15:21
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 4504843 to a16170c Compare May 26, 2023 19:00
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from a16170c to b292ebf Compare May 29, 2023 08:59
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from b292ebf to ce57ced Compare June 2, 2023 07:51
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from ce57ced to 9ea0ef7 Compare June 7, 2023 21:14
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 9ea0ef7 to 11939b5 Compare June 29, 2023 08:52
@memoyil memoyil force-pushed the feature/fix_crash_when_full_range_selected branch from 11939b5 to cb60bdb Compare July 7, 2023 10:00
@chefjackson
Copy link
Collaborator

Close for now as it's stale. Feel free to reopen after updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants