@@ -694,10 +694,11 @@ traverseOwnedNodes(
694694 auto const [nextNFTPage, nftsCount] = cursorMaybe.value ();
695695
696696 // if limit reach , we return the next page and max as marker
697- if (nftsCount >= limit)
697+ if (nftsCount >= limit) {
698698 return AccountCursor{
699699 .index = nextNFTPage, .hint = std::numeric_limits<uint32_t >::max ()
700700 };
701+ }
701702
702703 // adjust limit ,continue traversing owned nodes
703704 limit -= nftsCount;
@@ -772,10 +773,11 @@ traverseOwnedNodes(
772773 for (;;) {
773774 auto const ownerDir = backend.fetchLedgerObject (currentIndex.key , sequence, yield);
774775
775- if (!ownerDir)
776+ if (!ownerDir) {
776777 return std::unexpected{
777778 Status (ripple::rpcINVALID_PARAMS, " Owner directory not found." )
778779 };
780+ }
779781
780782 ripple::SerialIter ownedDirIt{ownerDir->data (), ownerDir->size ()};
781783 ripple::SLE const ownedDirSle{ownedDirIt, currentIndex.key };
@@ -1428,25 +1430,29 @@ parseBook(
14281430std::expected<ripple::Book, Status>
14291431parseBook (boost::json::object const & request)
14301432{
1431- if (!request.contains (" taker_pays" ))
1433+ if (!request.contains (" taker_pays" )) {
14321434 return std::unexpected{
14331435 Status{RippledError::rpcINVALID_PARAMS, " Missing field 'taker_pays'" }
14341436 };
1437+ }
14351438
1436- if (!request.contains (" taker_gets" ))
1439+ if (!request.contains (" taker_gets" )) {
14371440 return std::unexpected{
14381441 Status{RippledError::rpcINVALID_PARAMS, " Missing field 'taker_gets'" }
14391442 };
1443+ }
14401444
1441- if (!request.at (" taker_pays" ).is_object ())
1445+ if (!request.at (" taker_pays" ).is_object ()) {
14421446 return std::unexpected{
14431447 Status{RippledError::rpcINVALID_PARAMS, " Field 'taker_pays' is not an object" }
14441448 };
1449+ }
14451450
1446- if (!request.at (" taker_gets" ).is_object ())
1451+ if (!request.at (" taker_gets" ).is_object ()) {
14471452 return std::unexpected{
14481453 Status{RippledError::rpcINVALID_PARAMS, " Field 'taker_gets' is not an object" }
14491454 };
1455+ }
14501456
14511457 auto takerPays = request.at (" taker_pays" ).as_object ();
14521458 if (!takerPays.contains (" currency" ))
@@ -1482,10 +1488,11 @@ parseBook(boost::json::object const& request)
14821488
14831489 ripple::AccountID payIssuer;
14841490 if (takerPays.contains (" issuer" )) {
1485- if (!takerPays.at (" issuer" ).is_string ())
1491+ if (!takerPays.at (" issuer" ).is_string ()) {
14861492 return std::unexpected{
14871493 Status{RippledError::rpcINVALID_PARAMS, " takerPaysIssuerNotString" }
14881494 };
1495+ }
14891496
14901497 if (!ripple::to_issuer (
14911498 payIssuer, boost::json::value_to<std::string>(takerPays.at (" issuer" ))
@@ -1512,18 +1519,20 @@ parseBook(boost::json::object const& request)
15121519 }};
15131520 }
15141521
1515- if ((!isXRP (payCurrency)) && (!takerPays.contains (" issuer" )))
1522+ if ((!isXRP (payCurrency)) && (!takerPays.contains (" issuer" ))) {
15161523 return std::unexpected{
15171524 Status{RippledError::rpcSRC_ISR_MALFORMED, " Missing non-XRP issuer." }
15181525 };
1526+ }
15191527
15201528 ripple::AccountID getIssuer;
15211529
15221530 if (takerGets.contains (" issuer" )) {
1523- if (!takerGets[" issuer" ].is_string ())
1531+ if (!takerGets[" issuer" ].is_string ()) {
15241532 return std::unexpected{
15251533 Status{RippledError::rpcINVALID_PARAMS, " taker_gets.issuer should be string" }
15261534 };
1535+ }
15271536
15281537 if (!ripple::to_issuer (
15291538 getIssuer, boost::json::value_to<std::string>(takerGets.at (" issuer" ))
0 commit comments