Skip to content

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

@socket-security
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
Contributor

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

4 participants