WTFAcademy / WTF-Ethers

我最近在重新学ethers.js,巩固一下细节,也写一个“WTF Ethers.js极简入门”,供小白们使用,每周更新1-3讲。Now supports English! 官网: https://wtf.academy
https://wtf.academy
Other
3.11k stars 507 forks source link

对比数据格式不同,无法触发 #44

Closed w-zhong closed 1 year ago

w-zhong commented 1 year ago

https://github.com/WTFAcademy/WTF-Ethers/blob/0a7ff6526ac07be961b47e3a1877870c28303a82/16_MultiCollect/MultiCollect.js#L58

应为: if ( ethers.utils.formatEther(balanceETH) > ethers.utils.formatEther(amount) && ethers.utils.formatEther(balanceWETH) >= ethers.utils.formatEther(amount) )

AmazingAng commented 1 year ago

感谢指出 提个pr吧

w-zhong commented 1 year ago

pr merged