test for new Iden functions
This commit is contained in:
parent
591c8c84b6
commit
0afc5f2c0c
3 changed files with 293 additions and 174 deletions
|
|
@ -4,16 +4,16 @@ var _ = require('underscore');
|
|||
var log = require('../log');
|
||||
var bitcore = require('bitcore');
|
||||
|
||||
function Profile(opts, password, storage) {
|
||||
preconditions.checkArgument(opts.email);
|
||||
function Profile(info, password, storage) {
|
||||
preconditions.checkArgument(info.email);
|
||||
preconditions.checkArgument(password);
|
||||
preconditions.checkArgument(storage);
|
||||
preconditions.checkArgument(storage.getItem);
|
||||
|
||||
this.email = opts.email;
|
||||
this.email = info.email;
|
||||
this.extra = info.extra;
|
||||
this.hash = bitcore.util.sha256ripe160(this.email + this.password).toString('hex');
|
||||
this.storage = storage;
|
||||
this.extra = opts.extra;
|
||||
};
|
||||
|
||||
Profile.fromObj = function(obj, password, storage) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue