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

perf(wallet): switch to native bip39 #2382

Merged
merged 1 commit into from
Dec 2, 2024
Merged

perf(wallet): switch to native bip39 #2382

merged 1 commit into from
Dec 2, 2024

Conversation

pwltr
Copy link
Collaborator

@pwltr pwltr commented Dec 2, 2024

Description

bip39.mnemonicToSeed() is slow in JS, blocking the thread for ~1400ms (iOS simulator). We can use react-native-quick-crypto for the underlying functions to make it run natively (2-6ms). I forked a lib here that already did this and made it drop-in ready so we can easily include it. No automated tests yet but I cross tested all the functions with the JS implementation.

Linked Issues/Tasks

Closes #364

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

Tests

  • Detox test
  • Unit test
  • No test

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 612 kB pwltr
npm/[email protected] None 0 1.1 MB boorad

🚮 Removed packages: npm/[email protected], npm/[email protected]

View full report↗︎

@pwltr pwltr requested a review from limpbrains December 2, 2024 12:26
@limpbrains
Copy link
Collaborator

Awesome!

@pwltr pwltr merged commit 88247bc into master Dec 2, 2024
7 checks passed
@pwltr pwltr deleted the perf/bip39 branch December 2, 2024 15:59
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.

Send: UI freezing when confirming tx
3 participants