add options to enter Priv Key on join
This commit is contained in:
parent
b70857f9e1
commit
2fbbd2a53a
3 changed files with 27 additions and 7 deletions
|
|
@ -214,16 +214,22 @@ WalletFactory.prototype.decodeSecret = function(secret) {
|
|||
}
|
||||
};
|
||||
|
||||
WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphrase, cb) {
|
||||
var self = this;
|
||||
|
||||
WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphrase, privateHex, cb) {
|
||||
var self = this;
|
||||
var s = self.decodeSecret(secret);
|
||||
if (!s) return cb('badSecret');
|
||||
|
||||
var privOpts = {
|
||||
networkName: this.networkName,
|
||||
};
|
||||
|
||||
if (privateHex && privateHex.length>10) {
|
||||
privOpts.extendedPrivateKeyString = privateHex;
|
||||
}
|
||||
|
||||
//Create our PrivateK
|
||||
var privateKey = new PrivateKey({
|
||||
networkName: this.networkName
|
||||
});
|
||||
var privateKey = new PrivateKey(privOpts);
|
||||
this.log('\t### PrivateKey Initialized');
|
||||
var opts = {
|
||||
copayerId: privateKey.getId(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue