Giveth / giveth-dapps-v2

This project is the aggregation of GIVeconomy and Giveth.io DApps in a single repo
https://staging.giveth.io
GNU General Public License v3.0
63 stars 33 forks source link

usdc recurring donation decimals are incorrect and transactions reverts #4861

Open divine-comedian opened 6 days ago

divine-comedian commented 6 days ago

when adding a recurring donation in usdc it does not seem to parse the decimals correctly.

It does not estimate the amount of months left from the proposed amount to deposit and amount to stream monthly - when going to the confirmaiton modal it shows an amount MUCH lower than the expected, based on the amounts input

in addition it appears the optional donation to giveth toggle is not working correctly - it always applies a donation to giveth even when you toggle it off!!

https://github.com/user-attachments/assets/6729b5af-bf83-44be-898a-3850f13d6bc8

kkatusic commented 4 days ago

@divine-comedian done hotfix for this USDC token, problem was with it's decimal, but also found problem related with months number, it wasn't ok. Other problem that you mentioned like applying donation to Giveth if you unchecked it didn't saw and also in video that you sent doesn't showing.

divine-comedian commented 4 days ago

@kkatusic from our discussion yesterday it appears that there is still an error in the flow somewhere

image

Things we've tested

image

It seems this could be related to how we handle depositing tokens or how we batch the deposit function together with creating a stream... bearing in mind USDC is the only token that has 6 decimal precision while all other tokens have 18.. the super USDC token has 18 decimals