Replace strUnHex pair return type with optional<Blob>

This commit is contained in:
seelabs
2019-08-14 13:13:45 -07:00
parent 7912ee6f7b
commit 0a256247a0
13 changed files with 48 additions and 47 deletions

View File

@@ -267,12 +267,12 @@ ValidatorToken::make_ValidatorToken(std::vector<std::string> const& tokenBlob)
token["validation_secret_key"].isString())
{
auto const ret = strUnHex (token["validation_secret_key"].asString());
if (! ret.second || ret.first.empty())
if (! ret || ret->empty())
return boost::none;
return ValidatorToken(
token["manifest"].asString(),
SecretKey(Slice{ret.first.data(), ret.first.size()}));
SecretKey(Slice{ret->data(), ret->size()}));
}
else
{