jshint compliance
This commit is contained in:
6
rpc.js
6
rpc.js
@@ -18,9 +18,11 @@ var isValidChannel = function (chan) {
|
|||||||
var checkSignature = function (signedMsg, publicKey) {
|
var checkSignature = function (signedMsg, publicKey) {
|
||||||
if (!(signedMsg && publicKey)) { return null; }
|
if (!(signedMsg && publicKey)) { return null; }
|
||||||
|
|
||||||
|
var signedBuffer;
|
||||||
|
var pubBuffer;
|
||||||
try {
|
try {
|
||||||
var signedBuffer = Nacl.util.decodeBase64(signedMsg);
|
signedBuffer = Nacl.util.decodeBase64(signedMsg);
|
||||||
var pubBuffer = Nacl.util.decodeBase64(publicKey);
|
pubBuffer = Nacl.util.decodeBase64(publicKey);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1018,7 +1018,7 @@ define([
|
|||||||
parsed = common.parseHash(parsed.hash);
|
parsed = common.parseHash(parsed.hash);
|
||||||
|
|
||||||
if (parsed.version === 0) {
|
if (parsed.version === 0) {
|
||||||
return channel;
|
return parsed.channel;
|
||||||
} else if (parsed.version !== 1) {
|
} else if (parsed.version !== 1) {
|
||||||
console.error("parsed href had no version");
|
console.error("parsed href had no version");
|
||||||
console.error(parsed);
|
console.error(parsed);
|
||||||
|
|||||||
Reference in New Issue
Block a user