Closed Tschuck closed 3 years ago
As an alternativ, Dmitry Chestnykh has implemented a scrypt adjustment for automatic calculation of the interruptStep value. Maybe you can use this implementation in the future.
https://www.stablelib.com/modules/_scrypt_scrypt_.html (see deriveKeyNonBlocking) (source: https://github.com/StableLib/stablelib/tree/master/packages/scrypt)
npm install @stablelib/scrypt
Maybe it will work well for such situations.
Using scrypt-async-js library can cause an incredible amount of setTimeouts calls. On weaker devices this can lead to the browser only executing the callback of the setTimeouts after 10 - 80 seconds.
With an adjusted "interruptStep" value the number of setTimeouts can be drastically reduced.
https://github.com/ConsenSys/eth-lightwallet/issues/200