remove console.logs
This commit is contained in:
parent
5e3b1e94e2
commit
7798e38253
18 changed files with 9 additions and 161 deletions
|
|
@ -1,38 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var imports = require('soop').imports();
|
||||
|
||||
function Storage() {
|
||||
}
|
||||
|
||||
// get value by key
|
||||
Storage.prototype.get = function(walletId,k) {
|
||||
};
|
||||
|
||||
// set value for key
|
||||
Storage.prototype.set = function(walletId, k, v) {
|
||||
};
|
||||
|
||||
// remove value for key
|
||||
Storage.prototype.remove = function(walletId, k) {
|
||||
};
|
||||
|
||||
Storage.prototype.getWalletIds = function() {
|
||||
};
|
||||
|
||||
// obj contains keys to be set
|
||||
Storage.prototype.setFromObj = function(walletId, obj) {
|
||||
};
|
||||
|
||||
Storage.prototype.setFromEncryptedObj = function(walletId, obj) {
|
||||
};
|
||||
|
||||
// wallet export - hex of encrypted wallet object
|
||||
Storage.prototype.getEncryptedObj = function(walletId) {
|
||||
};
|
||||
|
||||
// remove all values
|
||||
Storage.prototype.clearAll = function() {
|
||||
};
|
||||
|
||||
module.exports = require('soop')(Storage);
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
'use strict';
|
||||
var imports = require('soop').imports();
|
||||
var fs = imports.fs || require('fs');
|
||||
var parent = imports.parent || require('./Base');
|
||||
var CryptoJS = require('node-cryptojs-aes').CryptoJS;
|
||||
|
||||
var passwords = [];
|
||||
|
|
@ -12,7 +11,6 @@ function Storage(opts) {
|
|||
this.data = {};
|
||||
passwords[0] = opts.password;
|
||||
}
|
||||
Storage.parent = parent;
|
||||
|
||||
Storage.prototype._encrypt = function(string) {
|
||||
var encrypted = CryptoJS.AES.encrypt(string, passwords[0]);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Storage.prototype._decrypt = function(base64) {
|
|||
if (decrypted)
|
||||
decryptedStr = decrypted.toString(CryptoJS.enc.Utf8);
|
||||
} catch (e) {
|
||||
console.log('Error while decrypting ' + base64);
|
||||
// Error while decrypting
|
||||
return null;
|
||||
}
|
||||
return decryptedStr;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var imports = require('soop').imports();
|
||||
var parent = imports.parent || require('./Base');
|
||||
|
||||
function Storage() {
|
||||
}
|
||||
Storage.parent = parent;
|
||||
|
||||
Storage.prototype._read = function(k) {
|
||||
var ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue