FuelLabs / forc-wallet

A forc plugin for managing Fuel wallets.
99 stars 55 forks source link

Checksum Validation Bug in account.rs #216

Open Miska05 opened 1 month ago

Miska05 commented 1 month ago

Hey team! 👋 I was digging into the account.rs file and noticed something off with the checksum validation logic for Ethereum addresses around line 45.

Looks like the current implementation doesn’t fully handle cases where checksums aren't matching correctly. To fix this, I’d suggest using a stricter validation method that re-checks the checksum based on a standard like EIP-55. This would ensure we're catching all invalid addresses and preventing any weird edge cases from slipping through.

Proposed fix:

if !is_checksum_valid(s) { return Err("Invalid checksum for Ethereum address. Please check again."); }

Let me know what you think! Happy to help with the fix if needed.

kayagokalp commented 1 week ago

Hey there thank you for the issue report. We would be happy to see a PR landed if you wish to tackle it.

Feel free to send a PR!