mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix: Allow the borrower to delete a completed / inactive loan, too.
This commit is contained in:
@@ -86,10 +86,11 @@ LoanDelete::preclaim(PreclaimContext const& ctx)
|
||||
// should be impossible
|
||||
return tecINTERNAL; // LCOV_EXCL_LINE
|
||||
}
|
||||
if (loanBrokerSle->at(sfOwner) != account)
|
||||
if (loanBrokerSle->at(sfOwner) != account &&
|
||||
loanSle->at(sfBorrower) != account)
|
||||
{
|
||||
JLOG(ctx.j.warn())
|
||||
<< "LoanBroker for Loan does not belong to the account.";
|
||||
<< "Account is not Loan Broker Owner or Loan Borrower.";
|
||||
return tecNO_PERMISSION;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user