Mark raw seed as invalid if smaller than 32 char (#1022)

* mark raw seed as invalid if empty

* remove logs

* lint

* require a seed >=32

* Seed length checking

* Linting
This commit is contained in:
Thibaut Sardan 2019-04-29 13:58:20 +02:00 committed by Jaco Greeff
parent 9a75af70c7
commit 0622299362

View File

@ -71,7 +71,7 @@ function isHexSeed (seed: string): boolean {
}
function rawValidate (seed: string): boolean {
return seed.length <= 32 || isHexSeed(seed);
return ((seed.length > 0) && (seed.length <= 32)) || isHexSeed(seed);
}
function addressFromSeed (phrase: string, derivePath: string, pairType: KeypairType): string {