Changed validMnemonic to isValidMnemonic.
This commit is contained in:
parent
807b27048b
commit
0b8cf42fcf
@ -238,11 +238,12 @@ function entropyToMnemonic(entropy) {
|
|||||||
return words.join(' ');
|
return words.join(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
function validMnemonic(mnemonic) {
|
function isValidMnemonic(mnemonic) {
|
||||||
try {
|
try {
|
||||||
mnemonicToEntropy(mnemonic);
|
mnemonicToEntropy(mnemonic);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,5 +255,5 @@ module.exports = {
|
|||||||
entropyToMnemonic: entropyToMnemonic,
|
entropyToMnemonic: entropyToMnemonic,
|
||||||
mnemonicToSeed: mnemonicToSeed,
|
mnemonicToSeed: mnemonicToSeed,
|
||||||
|
|
||||||
validMnemonic: validMnemonic,
|
isValidMnemonic: isValidMnemonic,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user