You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
- Added validation for Ethereum addresses using the EIP-55 checksum standard.
- Implemented the `validate_eth_address` function to ensure all Ethereum addresses are correctly validated before use.
- Updated the `Account::new` constructor to include checksum validation logic.
- Included test cases to verify the correctness of valid and invalid Ethereum addresses.
- Improved error handling for invalid addresses.
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.
The text was updated successfully, but these errors were encountered: