BuidlGuidl / grants.buidlguidl.com

https://grants-bg.vercel.app
MIT License
3 stars 3 forks source link

Error when batch approving 3 grant proposals of 0.15 eth each (total grant) #126

Closed Pabl0cks closed 4 months ago

Pabl0cks commented 4 months ago

When trying to approve 3 grant proposals (proposed status), where each of them have a total askAmount of 0.15 eth, the contract fails to send the ETH. Error:

The contract function "splitETH" reverted with following reason:
TRANSFER_FAILED()

If askAmount for each of them is 0.25 or 0.16 ETH, it works nicely. I think the problem comes from Javascript rounding, for this case is trying to send 75000000000000000 wei for each of them, but total value to send is 224999999999999980, so it throws the error.