econia-labs / emojicoin-dot-fun

https://emojicoin-dot-fun.vercel.app
Other
7 stars 14 forks source link

[ECO-2103] Add inputs for min out amounts #257

Closed CRBl69 closed 1 month ago

CRBl69 commented 2 months ago

Description

This PR adds an advanced mode for swaps and liquidity provisioning.

The advanced mode adds a new field titled "Minimum output amount".

The user can then set a minimum output amount.

Whenever an other input changes, the minimum output amount is automatically updated.

image

image

image

image

image

image

image

image

image

Testing

See vecrel.

Checklist

vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
emojicoin-dot-fun 🛑 Canceled (Inspect) Oct 7, 2024 5:18am
emojicoin-dot-fun-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 5:18am
CRBl69 commented 2 months ago

I updated it to use percentages.

Now, whenever a user chooses to use percentages, this is what it looks like:

image

When clicking on the percent sign, it switches to this:

image

Note that the newly displayed value upon mode change is calculated as prevPercentage * outputAmount or prevMinOut / outputAmount * 100.

Also, percentage mode is enabled by default

CRBl69 commented 2 months ago

There is no Figma for this. Just freestyled.