mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-19 19:25:53 +00:00
fix boost optional stuff
This commit is contained in:
@@ -57,7 +57,7 @@ accountFromStringStrict(std::string const& account)
|
||||
{
|
||||
auto blob = ripple::strUnHex(account);
|
||||
|
||||
boost::optional<ripple::PublicKey> publicKey = {};
|
||||
std::optional<ripple::PublicKey> publicKey = {};
|
||||
if (blob && ripple::publicKeyType(ripple::makeSlice(*blob)))
|
||||
{
|
||||
publicKey =
|
||||
@@ -69,7 +69,7 @@ accountFromStringStrict(std::string const& account)
|
||||
ripple::TokenType::AccountPublic, account);
|
||||
}
|
||||
|
||||
boost::optional<ripple::AccountID> result;
|
||||
std::optional<ripple::AccountID> result;
|
||||
if (publicKey)
|
||||
result = ripple::calcAccountID(*publicKey);
|
||||
else
|
||||
@@ -320,7 +320,7 @@ traverseOwnedNodes(
|
||||
return nextCursor;
|
||||
}
|
||||
|
||||
boost::optional<ripple::Seed>
|
||||
std::optional<ripple::Seed>
|
||||
parseRippleLibSeed(boost::json::value const& value)
|
||||
{
|
||||
// ripple-lib encodes seed used to generate an Ed25519 wallet in a
|
||||
@@ -374,8 +374,8 @@ keypairFromRequst(boost::json::object const& request)
|
||||
" passphrase, secret, seed, or seed_hex"};
|
||||
}
|
||||
|
||||
boost::optional<ripple::KeyType> keyType;
|
||||
boost::optional<ripple::Seed> seed;
|
||||
std::optional<ripple::KeyType> keyType;
|
||||
std::optional<ripple::Seed> seed;
|
||||
|
||||
if (has_key_type)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ doChannelVerify(Context const& context)
|
||||
if(!request.at("public_key").is_string())
|
||||
return Status{Error::rpcINVALID_PARAMS, "publicKeyNotString"};
|
||||
|
||||
boost::optional<ripple::PublicKey> pk;
|
||||
std::optional<ripple::PublicKey> pk;
|
||||
{
|
||||
std::string const strPk = request.at("public_key").as_string().c_str();
|
||||
pk = ripple::parseBase58<ripple::PublicKey>(ripple::TokenType::AccountPublic, strPk);
|
||||
@@ -105,4 +105,4 @@ doChannelVerify(Context const& context)
|
||||
return response;
|
||||
}
|
||||
|
||||
} // namespace RPC
|
||||
} // namespace RPC
|
||||
|
||||
Reference in New Issue
Block a user