mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +00:00
Replace strUnHex pair return type with optional<Blob>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user