mocha test passing on console
This commit is contained in:
parent
bcb61810d5
commit
eb9acb958f
7 changed files with 185 additions and 191 deletions
|
|
@ -1670,7 +1670,7 @@ Wallet.prototype.indexDiscovery = function(start, change, cosigner, gap, cb) {
|
|||
|
||||
Wallet.prototype.disconnect = function() {
|
||||
this.log('## DISCONNECTING');
|
||||
this.unlock();
|
||||
this.lock.release();
|
||||
this.network.disconnect();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ WalletFactory.prototype._checkNetwork = function(inNetworkName) {
|
|||
|
||||
WalletFactory.prototype.open = function(walletId, passphrase) {
|
||||
this.storage._setPassphrase(passphrase);
|
||||
var w = this.read(walletId, opts);
|
||||
var w = this.read(walletId);
|
||||
if (w)
|
||||
w.store();
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ Storage.prototype.getWalletIds = function() {
|
|||
if (split.length == 2) {
|
||||
var walletId = split[0];
|
||||
|
||||
if (walletId === 'nameFor' || walletId === 'lock')
|
||||
if (!walletId || walletId === 'nameFor')
|
||||
continue;
|
||||
|
||||
if (typeof uniq[walletId] === 'undefined') {
|
||||
|
|
@ -190,19 +190,6 @@ Storage.prototype.getLastOpened = function() {
|
|||
return this.getGlobal('lastOpened');
|
||||
}
|
||||
|
||||
// Lock related
|
||||
Storage.prototype.setLock = function(walletId) {
|
||||
this.setGlobal(this._key(walletId, 'Lock'), this.sessionId());
|
||||
}
|
||||
|
||||
Storage.prototype.getLock = function(walletId) {
|
||||
return this.getGlobal(this._key(walletId, 'Lock'));
|
||||
}
|
||||
|
||||
Storage.prototype.removeLock = function(walletId) {
|
||||
this.removeGlobal(this._key(walletId, 'Lock'));
|
||||
}
|
||||
|
||||
//obj contains keys to be set
|
||||
Storage.prototype.setFromObj = function(walletId, obj) {
|
||||
for (var k in obj) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue