-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
refactor: Redirect to liquidity token page after adding liquidity #6705
refactor: Redirect to liquidity token page after adding liquidity #6705
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@memoyil is attempting to deploy a commit to the PancakeSwap Team on Vercel. A member of the Team first needs to authorize it. |
81e3e33
to
4b7f1e9
Compare
4b7f1e9
to
504c526
Compare
504c526
to
7705249
Compare
7705249
to
9ef1c4f
Compare
9ef1c4f
to
f926c06
Compare
f926c06
to
b964e08
Compare
b964e08
to
5df5313
Compare
5df5313
to
cb8175d
Compare
cb8175d
to
a07645d
Compare
a07645d
to
8fef785
Compare
8fef785
to
48b065c
Compare
48b065c
to
8215a6d
Compare
8215a6d
to
077edc9
Compare
Close for now as it's stale. Feel free to reopen after updated |
🤖 Generated by Copilot at 81e3e33
Summary
🎣🔄🐛
Refactored the pending text logic for increasing liquidity in V3 by creating a custom hook
useSupplyingPendingText
and using it in bothIncreaseLiquidityV3.tsx
andV3FormView/index.tsx
. Improved the error handling and redirection logic for the percentage inputs and the liquidity supply operation.Walkthrough
useSupplyingPendingText
and reuse it in both theIncreaseLiquidityV3.tsx
and theV3FormView/index.tsx
files (link, link, link)formatCurrencyAmount
,currentLanguage
, andlocale
from the main components to the new hook file where they are used to format the amounts for the pending text (link, link, link, link)onPercentInput
callbacks for the currency A and B inputs to use optional chaining and nullish coalescing operators to handle the case wheremaxAmounts
is undefined and prevent errors and crashes (link, link, link, link)router.push
call in theIncreaseLiquidityV3.tsx
file to conditionally redirect to the existing position page or the liquidity page based on thehasExistingPosition
andexistingPositionDetails
variables and improve the user experience (link)