Update patches

This commit is contained in:
minibits-cash
2025-08-10 23:41:46 +02:00
parent 0a0298756a
commit e3e82bf0a8
5 changed files with 25 additions and 1598 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ android {
applicationId "com.minibits_wallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 58041
versionCode 58042
versionName "0.3.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "minibits_wallet",
"version": "0.3.0-beta.1",
"version": "0.3.0-beta.2",
"private": true,
"scripts": {
"android:clean": "cd android && ./gradlew clean",
-35
View File
@@ -1,35 +0,0 @@
diff --git a/node_modules/@scure/bip39/package.json b/node_modules/@scure/bip39/package.json
index c30d78b..95af581 100644
--- a/node_modules/@scure/bip39/package.json
+++ b/node_modules/@scure/bip39/package.json
@@ -45,7 +45,7 @@
"fetch-wordlist": "./scripts/fetch-wordlist.js"
},
"sideEffects": false,
- "main": "index.js",
+ "main": "src/index.ts",
"types": "./index.d.ts",
"exports": {
".": {
diff --git a/node_modules/@scure/bip39/src/index.ts b/node_modules/@scure/bip39/src/index.ts
index 5cd4255..6fba64b 100644
--- a/node_modules/@scure/bip39/src/index.ts
+++ b/node_modules/@scure/bip39/src/index.ts
@@ -5,6 +5,7 @@ import { sha256 } from '@noble/hashes/sha256';
import { sha512 } from '@noble/hashes/sha512';
import { randomBytes } from '@noble/hashes/utils';
import { utils as baseUtils } from '@scure/base';
+import QuickCrypto from 'react-native-quick-crypto'
// Japanese wordlist
const isJapanese = (wordlist: string[]) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093';
@@ -142,5 +143,8 @@ export function mnemonicToSeed(mnemonic: string, passphrase = '') {
* // new Uint8Array([...64 bytes])
*/
export function mnemonicToSeedSync(mnemonic: string, passphrase = '') {
- return pbkdf2(sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 });
+ // const original = pbkdf2(sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 });
+ const updated = new Uint8Array(QuickCrypto.pbkdf2Sync(normalize(mnemonic).nfkd, salt(passphrase), 2048, 64, 'sha512'));
+ // console.log('[@scure.bip39.mnemonicToSeedSync] Patched to use QuickCrypto.pbkdf2Sync')
+ return updated
}
+23
View File
@@ -0,0 +1,23 @@
diff --git a/node_modules/@scure/bip39/src/index.ts b/node_modules/@scure/bip39/src/index.ts
index 4284c3e..6ff83b2 100644
--- a/node_modules/@scure/bip39/src/index.ts
+++ b/node_modules/@scure/bip39/src/index.ts
@@ -33,6 +33,7 @@ import { pbkdf2, pbkdf2Async } from '@noble/hashes/pbkdf2';
import { sha256, sha512 } from '@noble/hashes/sha2';
import { abytes, anumber, randomBytes } from '@noble/hashes/utils';
import { utils as baseUtils } from '@scure/base';
+import QuickCrypto from 'react-native-quick-crypto'
// Japanese wordlist
const isJapanese = (wordlist: string[]) => wordlist[0] === '\u3042\u3044\u3053\u304f\u3057\u3093';
@@ -170,5 +171,9 @@ export function mnemonicToSeed(mnemonic: string, passphrase = ''): Promise<Uint8
* // new Uint8Array([...64 bytes])
*/
export function mnemonicToSeedSync(mnemonic: string, passphrase = ''): Uint8Array {
- return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
+ // return pbkdf2(sha512, normalize(mnemonic).nfkd, psalt(passphrase), { c: 2048, dkLen: 64 });
+
+ const updated = new Uint8Array(QuickCrypto.pbkdf2Sync(normalize(mnemonic).nfkd, psalt(passphrase), 2048, 64, 'sha512'));
+ // console.log('[@scure.bip39.mnemonicToSeedSync] Patched to use QuickCrypto.pbkdf2Sync')
+ return updated
}
File diff suppressed because it is too large Load Diff