throw error on bad base58.

This commit is contained in:
Christopher Jeffrey 2016-04-01 07:06:35 -07:00
parent bbf7748fbe
commit f3b7aee6fe

View File

@ -186,7 +186,7 @@ utils.fromBase58 = function fromBase58(str) {
for (; i < str.length; i++) {
ch = unbase58[str[i]];
if (ch == null)
return new Buffer([]);
throw new Error('Non-base58 character.');
carry = ch;
for (j = b256.length - 1; j >= 0; j--) {