Ethers.js: React Native is slow

Created on 26 Sep 2018  路  6Comments  路  Source: ethers-io/ethers.js

on React-Native it takes some thing about 20 min to encrypt wallet with a simple 6 digits numeric Password.

all etherjs functions preform late on real device but this one has a really big delay. i read preview issues and heard about some thing new like RNscrypt to solve it. is it implemented to etherjs now days or not?

does any know any other solutions?

discussion duplicate

Most helpful comment

I鈥檓 planning to add a hook system in, so people can somehow register alternative crypto functions for things like randomBytes and scrypt, so you can use native bindings.

This would help, I think?

All 6 comments

Please see these issues:

Let me know if that helps you. I'm adding a section for React Native to the docs for v4 and plan to include a shims in the dist files.

I鈥檓 planning to add a hook system in, so people can somehow register alternative crypto functions for things like randomBytes and scrypt, so you can use native bindings.

This would help, I think?

Any progress on that?
v4 is already out, but docs are still TODO: https://docs.ethers.io/ethers.js/html/cookbook-react.html?highlight=react

@ricmoo it's so hard to changescrypt package to another one. I've tried react-native-scrypt and react-native-fast-crypto. Can u provide some basic example of how to do that? I have trouble with npm run dist it doesn't want to work with react-native at all.

I have the same issue using ethers.js and react-native v0.59.5

I haven鈥檛 added any hooks yet for the scrypt, as it can be used as a possible attack vector in certain environments... I have a few ideas on how to do it, I just haven鈥檛 had a chance to experiment with it.

Was this page helpful?
0 / 5 - 0 ratings