fix broken register/login process
This commit is contained in:
@@ -5,9 +5,11 @@ define([
|
|||||||
'/common/common-util.js',
|
'/common/common-util.js',
|
||||||
'/common/outer/network-config.js',
|
'/common/outer/network-config.js',
|
||||||
'/common/credential.js',
|
'/common/credential.js',
|
||||||
|
'/bower_components/chainpad/chainpad.dist.js',
|
||||||
|
|
||||||
'/bower_components/tweetnacl/nacl-fast.min.js',
|
'/bower_components/tweetnacl/nacl-fast.min.js',
|
||||||
'/bower_components/scrypt-async/scrypt-async.min.js', // better load speed
|
'/bower_components/scrypt-async/scrypt-async.min.js', // better load speed
|
||||||
], function ($, Listmap, Crypto, Util, NetConfig, Cred) {
|
], function ($, Listmap, Crypto, Util, NetConfig, Cred, ChainPad) {
|
||||||
var Exports = {
|
var Exports = {
|
||||||
Cred: Cred,
|
Cred: Cred,
|
||||||
};
|
};
|
||||||
@@ -64,6 +66,8 @@ define([
|
|||||||
validateKey: opt.keys.validateKey, // derived validation key
|
validateKey: opt.keys.validateKey, // derived validation key
|
||||||
crypto: Crypto.createEncryptor(opt.keys),
|
crypto: Crypto.createEncryptor(opt.keys),
|
||||||
logLevel: 1,
|
logLevel: 1,
|
||||||
|
classic: true,
|
||||||
|
ChainPad: ChainPad,
|
||||||
};
|
};
|
||||||
|
|
||||||
var rt = opt.rt = Listmap.create(config);
|
var rt = opt.rt = Listmap.create(config);
|
||||||
@@ -133,7 +137,7 @@ define([
|
|||||||
return void cb('ALREADY_REGISTERED', res);
|
return void cb('ALREADY_REGISTERED', res);
|
||||||
}
|
}
|
||||||
|
|
||||||
cb(void 0, res);
|
setTimeout(function () { cb(void 0, res); });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -52,6 +52,11 @@ define([
|
|||||||
return hash;
|
return hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var setUserHash = LocalStore.setUserHash = function (hash) {
|
||||||
|
var sHash = Hash.serializeHash(hash);
|
||||||
|
localStorage[Constants.userHashKey] = sHash;
|
||||||
|
};
|
||||||
|
|
||||||
LocalStore.getAccountName = function () {
|
LocalStore.getAccountName = function () {
|
||||||
return localStorage[Constants.userNameKey];
|
return localStorage[Constants.userNameKey];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ define([
|
|||||||
window.alert("Test passed!");
|
window.alert("Test passed!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
localStorage.User_hash = result.userHash;
|
LocalStore.setUserHash(result.userHash);
|
||||||
|
|
||||||
var proxy = result.proxy;
|
var proxy = result.proxy;
|
||||||
proxy.edPublic = result.edPublic;
|
proxy.edPublic = result.edPublic;
|
||||||
|
|||||||
Reference in New Issue
Block a user