fix: Add assorted MPT/DEX fixes (#7040)

Co-authored-by: xrplf-ai-reviewer[bot] <266832837+xrplf-ai-reviewer[bot]@users.noreply.github.com>
Co-authored-by: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
This commit is contained in:
Gregory Tsipenyuk
2026-05-21 14:29:53 -04:00
committed by GitHub
parent 1a98182e23
commit 3547a9335f
27 changed files with 1618 additions and 421 deletions

View File

@@ -90,8 +90,12 @@ STPathSet::STPathSet(SerialIter& sit, SField const& name) : STBase(name)
if (hasAccount)
account = sit.get160();
XRPL_ASSERT(
!(hasCurrency && hasMPT), "xrpl::STPathSet::STPathSet : not has Currency and MPT");
if (hasCurrency && hasMPT)
{
JLOG(debugLog().error()) << "Bad path element MPT and Currency in pathset";
Throw<std::runtime_error>("bad path element: MPT and Currency");
}
if (hasCurrency)
asset = Currency::fromRaw(sit.get160());
@@ -101,7 +105,7 @@ STPathSet::STPathSet(SerialIter& sit, SField const& name) : STBase(name)
if (hasIssuer)
issuer = sit.get160();
path.emplace_back(account, asset, issuer, hasCurrency);
path.emplace_back(account, asset, issuer, hasCurrency || hasMPT);
}
}
}