wallet and profile backup working on the UX
This commit is contained in:
parent
e1b9f4f859
commit
7a463c9a9d
5 changed files with 32 additions and 25 deletions
|
|
@ -39,7 +39,6 @@ function Identity(email, password, opts) {
|
|||
|
||||
this.walletDefaults = opts.walletDefaults || {};
|
||||
this.version = opts.version || version;
|
||||
this.email = email;
|
||||
|
||||
// open wallets
|
||||
this.openWallets = [];
|
||||
|
|
@ -401,7 +400,7 @@ Identity.prototype.createWallet = function(opts, cb) {
|
|||
});
|
||||
opts.publicKeyRing.addCopayer(
|
||||
opts.privateKey.deriveBIP45Branch().extendedPublicKeyString(),
|
||||
opts.nickname || this.email
|
||||
opts.nickname || this.profile.getName()
|
||||
);
|
||||
log.debug('\t### PublicKeyRing Initialized');
|
||||
|
||||
|
|
@ -632,7 +631,7 @@ Identity.prototype.joinWallet = function(opts, cb) {
|
|||
walletOpts.network = joinNetwork;
|
||||
|
||||
walletOpts.privateKey = privateKey;
|
||||
walletOpts.nickname = opts.nickname || this.email;
|
||||
walletOpts.nickname = opts.nickname || this.profile.getName();
|
||||
|
||||
if (opts.password)
|
||||
walletOpts.password = opts.password;
|
||||
|
|
|
|||
|
|
@ -1171,7 +1171,7 @@ Wallet.fromObj = function(o, readOpts) {
|
|||
*/
|
||||
Wallet.prototype.toEncryptedObj = function() {
|
||||
var walletObj = this.toObj();
|
||||
return this.storage.export(walletObj);
|
||||
return this.storage.encrypt(walletObj);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue