-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Deduct transaction fee if user tries to donate/deposit max token balance #3903
Comments
Are we still waiting to pick this one up? |
@Reshzera could you please take it? |
@RamRamez Yes, I'll take a look |
@maryjaf @LatifatAbdullahi This Issue is ready to be tested on the staging, could you please take a look? |
Could you please take a look on below screen record ? @Reshzera
Screen.Recording.2024-07-31.at.7.13.07.PM.mov |
@maryjaf Sure |
@maryjaf I just push a new PR to staging to correct this bug, could you please take a look? |
@maryjaf I don't know I'll check with Mitch |
This doesn't look right @maryjaf @Reshzera If you are trying to donate MORE than your balance of tokens we should show an error related to "insufficient balance" which we already handle on the app Screencast.2024-08-01.10.24.02.mp4Screencast.2024-08-01.10.25.31.mp4please both of you have a look at these videos to properly understand the scenario where this error should be shown.. if I try to donate the max balance of a native token, it will fail in the MM because we are not accounting for the required gas fee. If as a user I try to manually input a donation amount that is NOT GREATER THAN MY TOTAL NATIVE TOKEN BALANCE but does not leave enough native token balance to cover the cost of the transaction THEN we should show the error message. IF I try to donate more than my total native token balance then we stick with showing the current insufficient wallet balance modal that is already in place. |
@divine-comedian, I just realized, I didn't know about the modal telling the user they don't have enough funds. I'll fix it. |
@maryjaf I just fix the problem that @divine-comedian mention and push it to the staging environment, I think now it's everything correct |
These videos didn't play for me and I couldn't download them Screen.Recording.2024-08-04.at.10.45.00.AM.movand I have some questions :
Is these scenarios are as expected ? |
@RamRamez had determined some limitation for donation to giveth in system , that it couldn't be lower than 0.000001 but now it is changed on stg and when I set 5, 10, 15 , 20 % for donation to giveth, it is shown 0 in below screen record I try to show the behavior of system on stg and prod Screen.Recording.2024-08-04.at.6.13.49.PM.mov |
Maybe it is related to this issue Giveth/impact-graph#1710 |
This is the correct behaviour! 🎉 |
please take up investigation @Reshzera on the related bug MJ is reporting as I will be on vacation this week. |
kindly reminder |
@maryjaf I think this is related to the issue mentioned Giveth/impact-graph#1710, @lovelgeorge99 could you take a look? |
Thanks @Reshzera |
To prevent users from accidentally donating or depositing all of their native tokens we should automatically subtract the estimated transaction fee from their available balances
If a user presses the button to input the max amount into an input field such as depositing into their stream balance or donating to a project we should input their native balance - estimated tx fee
If a user manually inputs an amount that exceeds this projected available balance we should throw a warning underneath the input field and prevent the user from continuing - they must lower the amount to continue
The warning text should say:
"You need to keep at least {amount} {native token} in your wallet to pay the network fees for this transaction. Please enter a lower amount."
to be clear this is a very niche error message, take for example:
which exceeds their balance, even though they are "donating" less than their balance the tx fee added would cause it to fail. so we show the error message.
Originally posted by @maryjaf in #3091 (comment)
The text was updated successfully, but these errors were encountered: