-
Notifications
You must be signed in to change notification settings - Fork 70
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
Frontend for Opening a New Position with 1-Click-LP #710
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
332d57b
to
b32a291
Compare
b32a291
to
822a7fa
Compare
822a7fa
to
31fa866
Compare
@@ -252,6 +285,40 @@ export const useGetTickPrices = () => { | |||
return getTickPrices | |||
} | |||
|
|||
export const useGetTicksFromPriceRange = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure about this calculation. Whosoever is reviewing it, please take a look!
@@ -141,4 +168,36 @@ const darkPalete: ThemeOptions = { | |||
}, | |||
} | |||
|
|||
const newDarkPalette: ThemeOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
colors and fonts being used in this new lp page are different from the existing ones. hence made this a separate one.
@@ -25,7 +25,8 @@ | |||
"@styles/*": ["src/styles/*"], | |||
"@types/*": ["src/types/*"], | |||
"@utils/*": ["src/utils/*"], | |||
"@queries/*": ["src/queries/*"] | |||
"@queries/*": ["src/queries/*"], | |||
"@state/*": ["src/state/*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we weren't doing this already?
b20f7aa
to
dfda8ed
Compare
dfda8ed
to
e93ac9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here liquidation price doesn't update as I adjust collat ratio - is that out of scope for this PR and being added in a diff PR?
Also the default checkbox should uncheck itself if I adjust my collateralization ratio, and then if I re-check the box it should go back to the default ratio
We should also have the default price ranges filled out to be full range
) | ||
|
||
function getSteps() { | ||
return ['Depositing ETH', 'Earning interest'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets actually just make this one step of 'Depositing ETH' since the user isn't earning fees + funding at their deposit, they earn fees + funding over time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deposit ERC-20s, earn ETH. | ||
</Typography> | ||
<Typography variant="subtitle1" className={classes.subtitle}> | ||
Provide liquidity to earn interest through fees and funding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide liquidity to earn interest through fees and funding. | |
Provide liquidity to earn through fees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
<div className={classes.root}> | ||
<div className={classes.container}> | ||
<Typography variant="h1" className={classes.title}> | ||
Deposit ERC-20s, earn ETH. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deposit ERC-20s, earn ETH. | |
Deposit ETH, earn fees |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
Task:
Frontend for Opening a New Position for Mint + LP. New LP page is at
/new-lp
slugDescription
This is the 1st part of 1-Click-LP project, which basically builds on top of
ControllerHelper
smart contract.Loom video
The frontend lets the user input ETH amount. This amount then gets split out into
ethInVault
andethInLP
.Type of change
How Has This Been Tested
Couldn't test it on any network, neither
local
norGoerli
, sinceControllerHelper
contract isn't ready to be deployed there. @DemolaJames is currently working on deploying it onGoerli
.So no other way but to compare it with the reference implementation in this PR. Compared the ETH deposit values and everything seems fine.
FE Checklist
User Facing Checklist