Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Related to issue #216 #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Miska05
Copy link

@Miska05 Miska05 commented Nov 28, 2024

  • 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.

- 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.
@CLAassistant
Copy link

CLAassistant commented Nov 28, 2024

CLA assistant check
All committers have signed the CLA.

///
/// # Returns
/// * `Result<Account, &'static str>` - Returns an Account if the address is valid, or an error message otherwise.
pub fn new(index: Option<usize>, unverified: Unverified, cmd: Option<Command>) -> Result<Self, &'static str> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't called from anywhere.

}

// Example test cases for Ethereum address validation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are they example test cases?

@sdankel
Copy link
Member

sdankel commented Mar 25, 2025

Please update the title to something meaningful and link the issue in the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants