Skip to content

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jun 24, 2025

  • Add more test for getFormattedAddress, as the logic can be confusing.
  • Enforce 42 chars address as evm address (no fallback to starknet)
  • Reject string not starting by Ox or OX as address

Those changes add more restriction on the address validation

before:

  • 123 is a valid starknet address
  • OXOOO... is a an invalid evm but valid starknet address

after:

  • invalid evm address will not fallback, and considered as valid starknet address
  • only process string starting by 0x

@wa0x6e wa0x6e marked this pull request as ready for review June 24, 2025 17:49
@wa0x6e wa0x6e requested a review from ChaituVR June 24, 2025 17:50
@wa0x6e wa0x6e changed the title test: add more getFormattedAddress casing test fix: do not fallback evm address to starknet Jun 25, 2025
@wa0x6e wa0x6e merged commit f59f680 into master Jun 25, 2025
5 checks passed
@wa0x6e wa0x6e deleted the test-add-more-getformattedaddress-tests branch June 25, 2025 14:44
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.

2 participants