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

validateAndParseAddress doesnt parse bigints any longer #1258

Open
BitWonka opened this issue Nov 8, 2024 · 0 comments
Open

validateAndParseAddress doesnt parse bigints any longer #1258

BitWonka opened this issue Nov 8, 2024 · 0 comments
Labels
Type: bug Something isn't working

Comments

@BitWonka
Copy link

BitWonka commented Nov 8, 2024

Describe the bug
I believe a bug was introduced in #1143 for v6.10.
bigints no longer validateAndParseAddress due to the change in addAddressPadding and always throws Invalid Address Format. i believe this was due to the toHex being done after adding a hexprefix

https://github.com/starknet-io/starknet.js/pull/1143/files#diff-ca62a13994aae3c545ad2d796d272f3ee8c0ab33b83bb3d5c023dc553b55f984

To Reproduce
validateAndParseAddress(2368576823837625528275935341135881659748932889268308403712618244410713532584n)
throws

Expected behavior
return 0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8

Screenshots
NA

Desktop (please complete the following information):

  • Browser & version [e.g. chrome, safari, webworker] NA
  • Node version [e.g. 16.0.1] NA
  • Starknet.js version 6.10.0 or later
  • Network [devnet, testnet] NA

Additional context
Add any other context about the problem here.

@BitWonka BitWonka added the Type: bug Something isn't working label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant