Remove warning, add TODO for future checks (#244)

This commit is contained in:
Jaco Greeff
2018-11-10 11:37:28 +01:00
committed by GitHub
parent 1a9ea424c4
commit a9878a2049
+4 -3
View File
@@ -24,9 +24,10 @@ export default function decode (encoded: string | Uint8Array, prefix: Prefix = d
assert(defaults.allowedPrefix.includes(decoded[0] as Prefix), error('Invalid decoded address prefix'));
assert(defaults.allowedEncodedLengths.includes(decoded.length), error('Invalid decoded address length'));
if (decoded[0] !== prefix) {
console.log(`WARN: Expected ${prefix}, found ${decoded[0]}`);
}
// TODO Unless it is an "use everywhere" prefix, throw an error
// if (decoded[0] !== prefix) {
// console.log(`WARN: Expected ${prefix}, found ${decoded[0]}`);
// }
const isPublicKey = decoded.length === 35;