forked from lthn/blockchain
fixed minor errors
This commit is contained in:
parent
095d0e24fb
commit
1fabcee504
2 changed files with 11 additions and 4 deletions
|
|
@ -235,7 +235,7 @@ namespace currency
|
|||
//let's validate each word
|
||||
for (const auto& w: words)
|
||||
{
|
||||
if (!tools::mnemonic_encoding::valid_word(words))
|
||||
if (!tools::mnemonic_encoding::valid_word(w))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,10 +36,17 @@ namespace tools
|
|||
return API_RETURN_CODE_OK;
|
||||
}
|
||||
|
||||
if (result.syntax_correct)
|
||||
if (result.syntax_correct && result.require_password)
|
||||
{
|
||||
currency::account_base acc;
|
||||
result.hash_sum_matched = acc.restore_from_seed_phrase(seed_phrase, seed_password);
|
||||
if (seed_password.size())
|
||||
{
|
||||
currency::account_base acc;
|
||||
result.hash_sum_matched = acc.restore_from_seed_phrase(seed_phrase, seed_password);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.hash_sum_matched = false;
|
||||
}
|
||||
}
|
||||
return API_RETURN_CODE_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue