Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to maintain multiple wallet ,need to store separate key json file? #367

Closed
jesuasir007 opened this issue Aug 25, 2021 · 3 comments
Closed

Comments

@jesuasir007
Copy link

I have try to create multiple eth account ,need to use separate Keystore json file for keystoremanagement ,any one know about this ?like trust wallet

@dangell7
Copy link

dangell7 commented Sep 2, 2021

Yes create a new keystore for each Wallet.

@RaviRanjan-11
Copy link
Contributor

Create a new Keystore at a different path update the enums Accordingly

func getKeystoreManager (rawPath: WalletType) -> KeystoreManager? {
let userDir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
let path = userDir+"/keystore/(rawPath.rawValue)"
return KeystoreManager.managerForPath(path, scanForHDwallets: true, suffix: "json") }
enum WalletType: String { case main = "Primary" case alternate = "Secondary" }

@jesuasir007
Copy link
Author

ok thank you ,
I have tried this type .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants