create new wallet from within a profile working
This commit is contained in:
parent
ab2424f478
commit
ff44897922
5 changed files with 33 additions and 65 deletions
|
|
@ -55,7 +55,7 @@ function Identity(email, password, opts) {
|
|||
'testnet': Identity._newInsight(opts.network.testnet),
|
||||
};
|
||||
|
||||
this.walletDefaults = opts.wallet || {};
|
||||
this.walletDefaults = opts.walletDefaults || {};
|
||||
this.version = opts.version || version;
|
||||
|
||||
// open wallets
|
||||
|
|
@ -338,7 +338,8 @@ Identity.prototype.createWallet = function(opts, cb) {
|
|||
opts.totalCopayers = totalCopayers;
|
||||
opts.version = opts.version || this.version;
|
||||
|
||||
this.storage.setPassword(opts.password);
|
||||
if (opts.password)
|
||||
this.storage.setPassword(opts.password);
|
||||
|
||||
var self = this;
|
||||
var w = Identity._newWallet(opts);
|
||||
|
|
@ -419,7 +420,7 @@ Identity.prototype.openWallet = function(walletId, password, cb) {
|
|||
};
|
||||
|
||||
|
||||
Identity.prototype.listWallets = function() {
|
||||
Identity.prototype.listWallets = function(a) {
|
||||
return this.profile.listWallets();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,6 @@ Wallet.read = function(walletId, storage, network, blockchain, skipFields, cb) {
|
|||
var w, err;
|
||||
obj.id = walletId;
|
||||
try {
|
||||
console.log('[Wallet.js.218:network:]',network); //TODO
|
||||
w = self.fromObj(obj, storage, network, blockchain, skipFields);
|
||||
} catch (e) {
|
||||
log.debug("ERROR: ", e.message);
|
||||
|
|
@ -969,7 +968,7 @@ Wallet.prototype.store = function(cb) {
|
|||
this.keepAlive();
|
||||
|
||||
var val = this.toObj();
|
||||
var key = 'wallet::' + this.id + ((val.opts && val.opts.name) ? '_' + obj.opts.name : '');
|
||||
var key = 'wallet::' + this.id + ((val.opts && val.opts.name) ? '_' + val.opts.name : '');
|
||||
this.storage.set(key, val, function(err) {
|
||||
log.debug('Wallet stored');
|
||||
if (cb)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ angular
|
|||
})
|
||||
.when('/create', {
|
||||
templateUrl: 'views/create.html',
|
||||
validate: false
|
||||
validate: true
|
||||
})
|
||||
.when('/copayers', {
|
||||
templateUrl: 'views/copayers.html',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue