return no offers when an owner directory is not found (#176)

This commit is contained in:
Nathan Nichols
2022-06-15 16:19:08 -05:00
committed by GitHub
parent 3d3b8e91b6
commit fa8405df83
6 changed files with 29 additions and 4 deletions

View File

@@ -58,6 +58,12 @@ doAccountChannels(Context const& context)
if (auto const status = getAccount(request, accountID); status)
return status;
auto rawAcct = context.backend->fetchLedgerObject(
ripple::keylet::account(accountID).key, lgrInfo.seq, context.yield);
if (!rawAcct)
return Status{Error::rpcACT_NOT_FOUND, "accountNotFound"};
ripple::AccountID destAccount;
if (auto const status =
getAccount(request, destAccount, JS(destination_account));