WeiPay icon indicating copy to clipboard operation
WeiPay copied to clipboard

Multiple Wallets

Open chrisfenos opened this issue 7 years ago • 1 comments

Is your feature request related to a problem? Please describe. There is a clear need to allow user's to create multiple wallets.

Describe the solution you'd like Allow users to create multiple wallets

Need to track the amount of wallets in the reducer and when the user wants to switch wallets we can just change the derived path.

Every wallet name must map to an index in the masterNode.derivePath

var HDNode = require('ethers').HDNode; var mnemonic = "12 words"; var masterNode = HDNode.fromMnemonic(mnemonic); console.log(masterNode); var wallet1 = masterNode.derivePath("m/44'/60'/0'/0/0"); console.log("wallet 1 - " , wallet1); var wallet2 = masterNode.derivePath("m/44'/60'/1'/0/0"); console.log("wallet 2 - " , wallet2);

Helpful Resources https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki https://docs.ethers.io/ethers.js/html/api-advanced.html#hdnode

chrisfenos avatar Sep 11 '18 11:09 chrisfenos

This is a bit different from having multiple wallets to having multiple instances of an hd node.

If we want to support multiple wallets, we should be supporting both HD nodes and importing of NEW private keys. Will need to put on hold to consider the UI implementation of such.

GregTheGreek avatar Sep 23 '18 15:09 GregTheGreek