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

When Users attempt to donate with Solana Devnet, the calculations for Giveth Givbacks after selecting any of the percentage is not correct (the amount being donated to Giveth shown on the preview modal is also wrong) #1710

Closed
LatifatAbdullahi opened this issue Jul 22, 2024 · 25 comments
Assignees
Labels
bug Something isn't working

Comments

@LatifatAbdullahi
Copy link

Given that Users have connected their wallet and Signed In.
And the Network is Solana Devnet
And Users have inputted the number of tokens to be donated
When Users select a percentage to be donated to giveth
Then the Giveth donation calculated amount is still equal to the amount being donated to the Project

Screenshot (148)

@divine-comedian
Copy link
Collaborator

divine-comedian commented Jul 22, 2024

@LatifatAbdullahi - you can confirm this only applies when on solana devnet? no other chains are affected by this bug?

@MohammadPCh - can you check this out or delegate it to another FE dev?

@github-project-automation github-project-automation bot moved this to New Issues in All-Devs Jul 22, 2024
@divine-comedian divine-comedian moved this from New Issues to Product Backlog in All-Devs Jul 22, 2024
@LatifatAbdullahi
Copy link
Author

@LatifatAbdullahi - you can confirm this only applies when on solana devnet? no other chains are affected by this bug?

@MohammadPCh - can you check this out or delegate it to another FE dev?

Yes, only on Solana Devnet

@MohammadPCh
Copy link
Collaborator

@lovelgeorge99 could you please take this? Thanks

@lovelgeorge99
Copy link
Contributor

ok i will work on this 👍

@lovelgeorge99 could you please take this? Thanks

@maryjaf
Copy link
Collaborator

maryjaf commented Aug 6, 2024

Could you please take a look on this comment
@lovelgeorge99
Giveth/giveth-dapps-v2#3903 (comment)

@lovelgeorge99
Copy link
Contributor

lovelgeorge99 commented Aug 7, 2024

@maryjaf

Image

Earlier the logic was if the user is trying to donate 0.000001 , the giveth donation would automatically change to 0.000001 also(that is the minimum donation amount ) and total donation would be 0.000001 + 0.000001 = 0.000002 .
Since the users total donation is only 0.000001 ,he cant donate 0.000002 .

Now the new logic is that if the user is trying to donate a amount less than the minimum giveth donation amount ,giveth donation is converted to 0

Image

@maryjaf
Copy link
Collaborator

maryjaf commented Aug 7, 2024

Thanks @lovelgeorge99
Is this new logic and UX approved by @divine-comedian also?

@divine-comedian
Copy link
Collaborator

Sorry I don't understand clearly what is explained. Is it this?

  • Minimum amount that can be entered on the donation input is 0.000001
  • user enters to donate minimum amount - 0.000001
  • has selected donate % to Giveth

Since we can't accept numbers under the minumum (e.g. 0.000001 * 5%) the giveth donation amount is then rounded up to the minimum amount? 0.000001. This means the user ends up donating 0.000002 ?

If this is true then what we should do check the box for "I do not want to support Giveth . . . " to ensure no second tx is generated and the text shown on the page makes sense.

@maryjaf
Copy link
Collaborator

maryjaf commented Aug 11, 2024

Sorry I don't understand clearly what is explained. Is it this?

  • Minimum amount that can be entered on the donation input is 0.000001
  • user enters to donate minimum amount - 0.000001
  • has selected donate % to Giveth

Since we can't accept numbers under the minumum (e.g. 0.000001 * 5%) the giveth donation amount is then rounded up to the minimum amount? 0.000001. This means the user ends up donating 0.000002 ?

This is the previous behavior of system in donation page,
the current behavior is like as below video

Screen.Recording.2024-08-11.at.11.51.06.AM.mov

My question is, even though the user has chosen a percentage and "Donating 15% to Giveth: 0 GIV" is shown, is the behavior accepted? @divine-comedian

  • Enter 0.000001 GIV for donation
  • Select 5 or 10,15 20 % for donating to Giveth
  • "Donating % to Giveth" is set 0

image

@divine-comedian
Copy link
Collaborator

yes @maryjaf

@maryjaf maryjaf moved this from QA to Done in All-Devs Aug 11, 2024
@maryjaf
Copy link
Collaborator

maryjaf commented Aug 11, 2024

This change should be reverted
@divine-comedian @lovelgeorge99
cc: @MohammadPCh

Screen.Recording.2024-08-11.at.7.21.10.PM.mov

@maryjaf maryjaf moved this from Done to QA in All-Devs Aug 11, 2024
@maryjaf maryjaf moved this from QA to In Progress in All-Devs Aug 12, 2024
@kkatusic
Copy link
Collaborator

@maryjaf you used Trust wallet? thx

@lovelgeorge99
Copy link
Contributor

@maryjaf you used Trust wallet? thx

2024-08-12.10-40-37.mp4

@maryjaf
Copy link
Collaborator

maryjaf commented Aug 12, 2024

@maryjaf you used Trust wallet? thx

2024-08-12.10-40-37.mp4

No I tested it on Metamask

@maryjaf
Copy link
Collaborator

maryjaf commented Aug 12, 2024

Sorry I don't understand clearly what is explained. Is it this?

  • Minimum amount that can be entered on the donation input is 0.000001
  • user enters to donate minimum amount - 0.000001
  • has selected donate % to Giveth

Since we can't accept numbers under the minumum (e.g. 0.000001 * 5%) the giveth donation amount is then rounded up to the minimum amount? 0.000001. This means the user ends up donating 0.000002 ?

This is the previous behavior of system in donation page, the current behavior is like as below video

Screen.Recording.2024-08-11.at.11.51.06.AM.mov

My question is, even though the user has chosen a percentage and "Donating 15% to Giveth: 0 GIV" is shown, is the behavior accepted? @divine-comedian

  • Enter 0.000001 GIV for donation
  • Select 5 or 10,15 20 % for donating to Giveth
  • "Donating % to Giveth" is set 0

image

Actually the problem is related this new logic, in this scenario that user enters 0.000001( minimum amount of donation) and select a percentage for donating to Giveth
Based on new logic , the amount of donation to Giveth is set 0 and the reported bug happens

@kkatusic kkatusic self-assigned this Aug 13, 2024
@kkatusic
Copy link
Collaborator

kkatusic commented Aug 13, 2024

@divine-comedian this is how thing are sorted up, minimal GIV donation is 0.000001 (read 5 decimals zeros) and for example 5% of GIV donation to Giveth is 0.00000005 GIV (read 7 decimals zeros). App than setup GIV 5% donation to 0 and that's why the transaction fails. Why did someone implement this code, maybe there was some request for it.

Now what you want to do, to allow small amount of GIV token donation to Giveth if someone add smallest amount of "main" donation, or we can than reset the GIveth donation amount to minimal token donation amount, in this previous case it was 0.000001 ?

thx

@divine-comedian
Copy link
Collaborator

chatted with kechy - since this feature/bug isn't super important so let's go the way of least headache.

If the minimum donation amount if set we should set the giveth donation amount to 0 and ensure the UI elements reflect this.

  • toggle the checkbox on the UI to "I don't want to make a donation to Giveth" and make sure the numbers on the UI are correct
  • ensure there is no amount entered on UI for "donating to Giveth"

image

@kkatusic kkatusic moved this from In Progress to Code Review/PR in All-Devs Aug 16, 2024
@divine-comedian
Copy link
Collaborator

@kkatusic what is the update on this issue?

@kkatusic
Copy link
Collaborator

@kkatusic what is the update on this issue?

this is waiting PR review :( I will ask for review

@kkatusic kkatusic moved this from Code Review/PR to QA in All-Devs Aug 30, 2024
@kkatusic
Copy link
Collaborator

@LatifatAbdullahi you can test when you get time ;)

@LatifatAbdullahi
Copy link
Author

@divine-comedian

These have been fulfilled

  • Set the giveth donation amount to 0 and ensure the UI elements reflect this - Pass
  • Toggle the checkbox on the UI to "I don't want to make a donation to Giveth" and make sure the numbers on the UI are correct - Pass
  • Ensure there is no amount entered on UI for "donating to Giveth" - Pass

However at the point of Donation confirmation, it takes too long to confirm donation, over a minute, it just keeps loading continuously and my wallet is deducted without a success modal.

BukkyProject._.Giveth.-.Google.Chrome.2024-08-30.16-57-13.mp4
Cloy._.Giveth.-.Google.Chrome.2024-08-21.18-33-00.mp4

image

sss

@divine-comedian
Copy link
Collaborator

@LatifatAbdullahi this is already done?

@LatifatAbdullahi
Copy link
Author

@kkatusic
The issue is not fixed

image

@LatifatAbdullahi LatifatAbdullahi moved this from QA to In Progress in All-Devs Sep 23, 2024
@kkatusic kkatusic self-assigned this Sep 26, 2024
@kkatusic
Copy link
Collaborator

kkatusic commented Oct 3, 2024

@LatifatAbdullahi, ccc @divine-comedian, making donation on Solana DevNet is old issue, we didn't manage it to work, I also reported that issue on package github account:

anza-xyz/wallet-adapter#1009

I tried and succeeded to made donation on SOlana project on production and it is working fine, check images:

Screenshot 2024-10-03 at 11 55 34
Screenshot 2024-10-03 at 11 54 56
Screenshot 2024-10-03 at 11 55 07
Screenshot 2024-10-03 at 11 55 31

you decide will we wait to they fix devnet transaction problem or we will close this issue

@divine-comedian
Copy link
Collaborator

honestly, not very important to get solana devnet perfect, if we are sure production is working OK I think we can move on!

@divine-comedian divine-comedian closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in All-Devs Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

6 participants