mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Apply suggestion from @Tapanito
Co-authored-by: Vito Tumas <5780819+Tapanito@users.noreply.github.com>
This commit is contained in:
@@ -250,14 +250,22 @@ LoanBrokerSet::doApply()
|
||||
if (auto const debtMax = tx[~sfDebtMaximum])
|
||||
broker->at(sfDebtMaximum) = *debtMax;
|
||||
|
||||
auto domainID = tx[~sfDomainID];
|
||||
if (domainID && *domainID == beast::zero)
|
||||
if (ctx_.view().rules().enabled(fixLendingProtocolV1_1) &&
|
||||
broker->isFlag(lsfLoanBrokerPrivate))
|
||||
{
|
||||
domainID = std::nullopt;
|
||||
if (auto const domainID = tx[~sfDomainID])
|
||||
{
|
||||
if (*domainID != beast::zero)
|
||||
{
|
||||
broker->setFieldH256(sfDomainID, *domainID);
|
||||
}
|
||||
else if (broker->isFieldPresent(sfDomainID))
|
||||
{
|
||||
broker->makeFieldAbsent(sfDomainID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
broker->at(~sfDomainID) = domainID;
|
||||
|
||||
view.update(broker);
|
||||
|
||||
associateAsset(*broker, vaultAsset);
|
||||
|
||||
Reference in New Issue
Block a user