mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-26 09:05:13 +01:00
using provided isValid method of coinstring
This commit is contained in:
@@ -78,11 +78,11 @@ module.exports = class extends Generator {
|
||||
}
|
||||
|
||||
_xkeyValidator( xpub ) {
|
||||
try {
|
||||
coinstring.decode(xpub);
|
||||
} catch( e ) {
|
||||
throw new Error('Invalid extended public key. Please check your input.');
|
||||
// TOOD: check for version
|
||||
if( !coinstring.isValid( xpub ) ) {
|
||||
throw new Error('Not an extended key.');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user