1
0
Fork 0
forked from lthn/blockchain

fixed minor errors

This commit is contained in:
cryptozoidberg 2020-12-03 22:15:27 +01:00
parent 095d0e24fb
commit 1fabcee504
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 11 additions and 4 deletions

View file

@ -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;
}

View file

@ -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;
}