remove storage from Wallet
This commit is contained in:
parent
a40a1bc261
commit
567cb8c713
8 changed files with 92 additions and 116 deletions
|
|
@ -46,17 +46,12 @@ Profile.create = function(email, password, storage, cb) {
|
|||
};
|
||||
|
||||
|
||||
Profile.any = function(storage, cb) {
|
||||
storage.getFirst(Profile.key(''), { onlyKey: true}, function(err, v, k) {
|
||||
return cb(k ? true : false);
|
||||
});
|
||||
};
|
||||
|
||||
Profile.open = function(email, password, storage, cb) {
|
||||
preconditions.checkArgument(cb);
|
||||
preconditions.checkState(storage.hasPassphrase());
|
||||
|
||||
var key = Profile.key(Profile.hash(email, password));
|
||||
console.log('[Profile.js.59:key:]',key); //TODO
|
||||
storage.get(key, function(err, val) {
|
||||
if (err || !val)
|
||||
return cb(new Error('PNOTFOUND: Profile not found'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue