React-native use RELEASE scheme crash, HDNode.fromSeedBuffer
See original GitHub issueReact-native, iOS, RELEASE
Hi, I got a crash on iOS platform only use release scheme.
function generatorBIP44() {
const mnemonic = bip39.generateMnemonic();
assert(bip39.validateMnemonic(mnemonic));
const seed = bip39.mnemonicToSeed(mnemonic);
const bitcoinNetwork = bitcoin.networks.bitcoin;
const master = bitcoin.HDNode.fromSeedBuffer(seed, bitcoinNetwork);
const derivePath = `m/44'/0'/0'/0/0`;
const node = master.derivePath(derivePath);
const keyPair = node.keyPair;
const privateKey = keyPair.toWIF();
const publicKeyBuffer = keyPair.getPublicKeyBuffer();
const publicKey = publicKeyBuffer.toString('hex');
const address = keyPair.getAddress();
return {
mnemonic,
address,
privateKey,
publicKey,
};
}
I found crash here
const master = bitcoin.HDNode.fromSeedBuffer(seed, bitcoinNetwork);
typeforce(types.tuple('ECPair', types.Buffer256bit), arguments)
If i remove typeforce check code, it’s OK.
It’s amazing when i run it OK on debug scheme, but always crash on release scheme. Someone please help me? Thx.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
React native app crash on ios when running release or debug
P.S. The app is running without crashes with npx react-native run-ios or in xcode after build. However npx react-native run-ios --configuration= ...
Read more >avalanche: Versions | Openbase
Introducing a new fetch based adapter for axios to make the library work inside service workers. Axios uses XMLHttpRequests by default which is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thx, and I fixed this issue.
Modify node_modules/metro-bundler/src/JSTransformer/worker/minify.js
Read the README, please.
Add reserve rules to uglifyjs.