Skip to content

Conversation

@Nodonisko
Copy link
Contributor

What is the current state of things and why does it need to change?

Mobile app and some controllers is using toChecksumAddress from ethereumjs-util package but this function is quite slow because of crypto operations happening inside. I plan to replace it with function from this package which is doing crypto operations too but it's memoized at least.

Memoization should help quite a lot because address pool is usually quite limited. I also made implementation in this package 4x faster and added few more addresses to test file.

Screenshot 2025-06-26 at 21 06 11

@socket-security
Copy link

socket-security bot commented Jun 26, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​lodash.memoize@​4.1.91001005476100
Added@​types/​lodash@​4.17.191001007892100

View full report

@Nodonisko Nodonisko force-pushed the chore/memoized-checksum-address branch from adcfef6 to a520d22 Compare June 27, 2025 12:04
@Nodonisko Nodonisko force-pushed the chore/memoized-checksum-address branch from a520d22 to ac8cf00 Compare June 27, 2025 12:08
@Nodonisko Nodonisko force-pushed the chore/memoized-checksum-address branch from ac8cf00 to 4a6b68b Compare June 27, 2025 12:10
Mrtenz
Mrtenz previously approved these changes Jun 27, 2025
Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

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

Nice!

@Mrtenz Mrtenz requested a review from Prithpal-Sooriya June 27, 2025 12:13
@Mrtenz Mrtenz merged commit 1ab6362 into MetaMask:main Jun 30, 2025
21 checks passed
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