Skip to content

Conversation

@sirdeggen
Copy link
Collaborator

@sirdeggen sirdeggen commented Nov 25, 2025

Description of Changes

Getting build errors in mobile arch when quick crypto is being used rather than react-native-get-random-values

Testing Procedure

Describe the tests you've added or any testing steps you've taken.

  • I have added new unit tests
  • All tests pass locally
  • I have tested manually in my local environment

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated CHANGELOG.md with my changes
  • I have run npm run doc and npm run lint one final time before requesting a review
  • I have fixed all linter errors to ensure these changes are compliant with ts-standard
  • I have run npm version patch so that my changes will trigger a new version to be released when they are merged

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

🏁 Benchmark Comparison (Node 22)

Comparing this PR (bac08c5) against master (726e75d).

✅ No regressions over the 5% threshold detected.

Benchmark Metric PR Branch Master Δ Change
BigNumber Arithmetic mul large numbers 8.84 ms 8.80 ms +0.04 ms +0.45%
BigNumber Arithmetic add large numbers 1.46 ms 1.46 ms +0.00 ms 0.00%
BigNumber Serialization toSm big 2.88 ms 2.86 ms +0.02 ms +0.70%
BigNumber Serialization toSm little 2.92 ms 2.91 ms +0.01 ms +0.34%
BigNumber Serialization fromSm big 2.98 ms 2.98 ms +0.00 ms 0.00%
BigNumber Serialization fromSm little 3.06 ms 3.05 ms +0.01 ms +0.33%
BigNumber Serialization fromScriptNum 3.06 ms 3.04 ms +0.02 ms +0.66%
Script Serialization Big script round trip 3.80 ms 3.77 ms +0.03 ms +0.80%
Transaction Verification deep chain verify 440.30 ms 444.16 ms -3.86 ms -0.87%
Transaction Verification wide transaction verify 458.63 ms 454.72 ms +3.91 ms +0.86%
Transaction Verification large tx verify 227.87 ms 224.53 ms +3.34 ms +1.49%
Transaction Verification nested inputs verify 104.26 ms 103.51 ms +0.75 ms +0.72%
Symmetric Key encrypt large 2MB 1497.05 ms 1528.63 ms -31.58 ms -2.07%
Symmetric Key decrypt large 2MB 1491.78 ms 1528.90 ms -37.12 ms -2.43%
Symmetric Key encrypt 50 small 6.46 ms 6.64 ms -0.18 ms -2.71%
Symmetric Key decrypt 50 small 6.29 ms 6.45 ms -0.16 ms -2.48%
Symmetric Key encrypt 200 medium 155.80 ms 159.37 ms -3.57 ms -2.24%
Symmetric Key decrypt 200 medium 155.99 ms 157.81 ms -1.82 ms -1.15%
Reader & Writer mixed ops 0.22 ms 0.22 ms +0.00 ms 0.00%
Reader & Writer large payloads 28.30 ms 27.92 ms +0.38 ms +1.36%
Reader & Writer 3000 small payloads 1.70 ms 1.70 ms +0.00 ms 0.00%
Reader & Writer 400 medium payloads 14.69 ms 14.85 ms -0.16 ms -1.08%
Atomic BEEF Transaction.toAtomicBEEF 1.48 ms 1.49 ms -0.01 ms -0.67%
Atomic BEEF Transaction.fromAtomicBEEF 3.61 ms 3.58 ms +0.03 ms +0.84%

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request removes the React Native-specific polyfill detection and loading code from Random.ts. The change eliminates the dependency on react-native-get-random-values, allowing React Native projects to use alternative crypto polyfills like react-native-quick-crypto that populate the standard globalThis.crypto API instead.

Key Changes

  • Removed React Native-specific polyfill detection and auto-loading logic from Random.ts
  • Updated documentation to remove references to react-native-get-random-values requirement
  • Bumped version to 1.9.11

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/primitives/Random.ts Removed React Native polyfill detection and loading code; simplified to rely on standard crypto APIs
package.json Version bumped to 1.9.11
package-lock.json Version bumped to 1.9.11
CHANGELOG.md Added entry for version 1.9.11 documenting the polyfill removal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sirdeggen sirdeggen merged commit 73b6ae6 into master Nov 25, 2025
10 checks passed
@sonarqubecloud
Copy link

@github-actions
Copy link

🏁 Benchmark Comparison (Node 22)

Comparing this PR (ba54643) against master (73b6ae6).

✅ No regressions over the 5% threshold detected. 🎉 1 significant speedup (>5% faster).

Speedups

  • 🎉 Atomic BEEF – Transaction.fromAtomicBEEF is 9.80% faster (3.59 ms vs 3.98 ms).
Benchmark Metric PR Branch Master Δ Change
BigNumber Arithmetic mul large numbers 8.80 ms 8.80 ms +0.00 ms 0.00%
BigNumber Arithmetic add large numbers 1.46 ms 1.45 ms +0.01 ms +0.69%
BigNumber Serialization toSm big 2.87 ms 2.90 ms -0.03 ms -1.03%
BigNumber Serialization toSm little 2.94 ms 2.95 ms -0.01 ms -0.34%
BigNumber Serialization fromSm big 3.03 ms 3.03 ms +0.00 ms 0.00%
BigNumber Serialization fromSm little 3.05 ms 3.06 ms -0.01 ms -0.33%
BigNumber Serialization fromScriptNum 3.08 ms 3.08 ms +0.00 ms 0.00%
Script Serialization Big script round trip 3.82 ms 3.83 ms -0.01 ms -0.26%
Transaction Verification deep chain verify 442.04 ms 453.48 ms -11.44 ms -2.52%
Transaction Verification wide transaction verify 454.33 ms 454.77 ms -0.44 ms -0.10%
Transaction Verification large tx verify 224.24 ms 224.00 ms +0.24 ms +0.11%
Transaction Verification nested inputs verify 103.66 ms 103.50 ms +0.16 ms +0.15%
Symmetric Key encrypt large 2MB 1496.48 ms 1531.38 ms -34.90 ms -2.28%
Symmetric Key decrypt large 2MB 1494.53 ms 1537.95 ms -43.42 ms -2.82%
Symmetric Key encrypt 50 small 6.46 ms 6.64 ms -0.18 ms -2.71%
Symmetric Key decrypt 50 small 6.27 ms 6.47 ms -0.20 ms -3.09%
Symmetric Key encrypt 200 medium 155.45 ms 160.10 ms -4.65 ms -2.90%
Symmetric Key decrypt 200 medium 153.84 ms 157.84 ms -4.00 ms -2.53%
Reader & Writer mixed ops 0.22 ms 0.22 ms +0.00 ms 0.00%
Reader & Writer large payloads 27.35 ms 28.30 ms -0.95 ms -3.36%
Reader & Writer 3000 small payloads 1.71 ms 1.76 ms -0.05 ms -2.84%
Reader & Writer 400 medium payloads 14.85 ms 15.31 ms -0.46 ms -3.00%
Atomic BEEF Transaction.toAtomicBEEF 1.48 ms 1.49 ms -0.01 ms -0.67%
Atomic BEEF Transaction.fromAtomicBEEF 3.59 ms 3.98 ms -0.39 ms -9.80%

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