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

Adjust Max button for -0.1 asset #1948

Closed
wants to merge 1 commit into from
Closed

Conversation

tacolopo
Copy link

Max swap would previously fail because it doesn't automatically adjust for gas fees. This change should alter the max to be -0.1, then check to make sure the balance stays positive, before attempting to swap, so it works right away off the bat without user interference. Just an idea as a potential UI improvement.

image

Copy link

changeset-bot bot commented Dec 13, 2024

⚠️ No Changeset found

Latest commit: ac0dbcd

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

@TalDerei
Copy link
Contributor

max functionality for swaps, as you pointed out, is not currently supported and requires more extensive changes, rather than simply hardcoding a subtraction factor in the frontend! However, we do currently support maximum sends between accounts: https://x.com/penumbrazone/status/1855018748014362964.

@TalDerei TalDerei closed this Dec 13, 2024
@tacolopo
Copy link
Author

@TalDerei Just for personal research, is there a reference for what makes it more complex? Is the idea to do analysis on each coin to fetch the gas fee for a transaction and then use that number to get closer to a full max swap? Regardless, the 0.1 would be sufficient for most (?) chains right now and would enable the "max" button swap to work for new users off the bat. Anyways, cool product, thanks for working on it.

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