simple one line fixes

pull/1/head
ansuz 6 years ago
parent ab04a7cb46
commit 0c3b898000

@ -1050,7 +1050,7 @@ define([
var blockHash = LocalStore.getBlockHash(); var blockHash = LocalStore.getBlockHash();
if (blockHash) { if (blockHash) {
console.log(blockHash); console.log(blockHash);
var parsed = Hash.parseBlockHash(blockHash); var parsed = Block.parseBlockHash(blockHash);
if (typeof(parsed) !== 'object') { if (typeof(parsed) !== 'object') {
console.error("Failed to parse blockHash"); console.error("Failed to parse blockHash");

@ -58,7 +58,7 @@ define([
localStorage[Constants.userHashKey] = sHash; localStorage[Constants.userHashKey] = sHash;
}; };
LocalStore.getBlockHash = function () { var getBlockHash = LocalStore.getBlockHash = function () {
return localStorage[Constants.blockHashKey]; return localStorage[Constants.blockHashKey];
}; };
@ -71,7 +71,8 @@ define([
}; };
LocalStore.isLoggedIn = function () { LocalStore.isLoggedIn = function () {
return typeof getUserHash() === "string"; return typeof getBlockHash() === 'string' ||
typeof getUserHash() === "string";
}; };

@ -34,8 +34,6 @@ define([
var symmetric = seed.subarray(Nacl.sign.seedLength, var symmetric = seed.subarray(Nacl.sign.seedLength,
Nacl.sign.seedLength + Nacl.secretbox.keyLength); Nacl.sign.seedLength + Nacl.secretbox.keyLength);
console.log("symmetric key: ", Nacl.util.encodeBase64(symmetric));
return { return {
sign: Nacl.sign.keyPair.fromSeed(signSeed), // 32 bytes sign: Nacl.sign.keyPair.fromSeed(signSeed), // 32 bytes
symmetric: symmetric, // 32 bytes ... symmetric: symmetric, // 32 bytes ...

Loading…
Cancel
Save