Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Seed.prototype.parse_base58 = function(j) {
if (typeof j !== 'string') {
throw new Error('Value must be a string');
}
if (!j.length || j[0] !== 's') {
this._value = NaN;
} else {
try {
const {bytes, type} = decodeSeed(j);
this._value = new BN(bytes);
this._type = type;
} catch (e) {
this._value = NaN;
}
}
return this;
};