a bit of cleanup, bug fixes, and lint compliance
This commit is contained in:
@@ -477,7 +477,7 @@ Version 1
|
||||
// XXX consider putting Block functions in /common/outer/login-block.js
|
||||
Hash.createBlockHash = function (href, key) {
|
||||
if (typeof(href) !== 'string') { return; }
|
||||
if (!key instanceof Uint8Array) { return; }
|
||||
if (!(key instanceof Uint8Array)) { return; }
|
||||
|
||||
// TODO verify inputs
|
||||
try { return href + '#' + Nacl.util.encodeBase64(key); }
|
||||
|
||||
@@ -139,7 +139,6 @@ define([], function () {
|
||||
|
||||
// given a path, asynchronously return an arraybuffer
|
||||
Util.fetch = function (src, cb) {
|
||||
var done = false;
|
||||
var CB = Util.once(cb);
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
@@ -897,7 +897,6 @@ define([
|
||||
|
||||
}).nThen(function (waitFor) {
|
||||
var blockHash = LocalStore.getBlockHash();
|
||||
|
||||
if (blockHash) {
|
||||
console.log(blockHash);
|
||||
var parsed = Hash.parseBlockHash(blockHash);
|
||||
@@ -922,9 +921,6 @@ define([
|
||||
return void console.error("failed to decrypt or decode block content");
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
// XXX debugging
|
||||
console.error("NO BLOCK HASH");
|
||||
}
|
||||
}).nThen(function (waitFor) {
|
||||
// XXX debugging
|
||||
|
||||
@@ -63,7 +63,7 @@ define([
|
||||
};
|
||||
|
||||
LocalStore.setBlockHash = function (hash) {
|
||||
LocalStorage[Constants.blockHashKey] = hash;
|
||||
localStorage[Constants.blockHashKey] = hash;
|
||||
};
|
||||
|
||||
LocalStore.getAccountName = function () {
|
||||
|
||||
Reference in New Issue
Block a user