fix walletlock tests

This commit is contained in:
Matias Alejo Garcia 2014-09-17 12:10:26 -03:00
commit 1ab7a4f8e8
7 changed files with 122 additions and 176 deletions

View file

@ -54,11 +54,13 @@ WalletLock.prototype._isLockedByOther = function(cb) {
WalletLock.prototype._setLock = function(cb) {
preconditions.checkArgument(cb);
preconditions.checkState(this.sessionId);
var self = this;
this.storage.setGlobal(this.key, {
sessionId: this.sessionId,
expireTs: Date.now() + this.timeoutMin * 60 * 1000,
}, function() {
cb(null);
});
};