Replies: 1 comment
-
You don't need to update node modules, in your project you can just extend the class. And import this file everywhere you are using wallet and use the // create a wallet-modified.ts
class WalletModified extends Wallet {
static fromEncryptedJson(json: string, password: Bytes | string, progressCallback?: ProgressCallback): Promise<Wallet> {
// your implementation
}
} // in your other files
import { WalletModified as Wallet } from '../utils/wallet-modified.ts';
// code
Wallet.fromEncryptedJson(..) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!It's a known problem that
fromEncryptedJson()
method is slow on ReactNative, because its bottle neck is the js implementation of scrypt. Basically i want to replace inkeystore.ts
line 183 with the native scrypt implementation ofreact-native-scrypt
, which should be faster. I have never edited a node_module by myself and i notice that changing the typescript file doesn't do anything, i guess it needs to be recompiled. I managed to see changes by changingkeystore.js
in the lib folder, which is pretty ugly file and i guess it is the compiled version or something. Of course trying to change implementation this way would be very hard for a noob like me. Could someone please tell me the steps to make changes in thekeystore.ts
file actually effective?Beta Was this translation helpful? Give feedback.
All reactions