fix: Skip CheckCash limit waiver for the issuer

This commit is contained in:
Gregory Tsipenyuk
2026-09-10 18:39:33 +01:00
committed by Bart
parent 1245254cac
commit a0c12420b5

View File

@@ -439,6 +439,12 @@ CheckCash::doApply()
AccountID const& deliverIssuer = flowDeliver.getIssuer();
auto const err = flowDeliver.asset().visit(
[&](Issue const& issue) -> std::optional<TER> {
// An issuer needs no holder-limit waiver to receive its own currency.
if (deliverIssuer == accountID_ && ctx_.view().rules().enabled(fixCleanup3_4_0))
{
return std::nullopt;
}
// If a trust line does not exist yet create one.
Issue const& trustLineIssue = issue;
AccountID const truster = deliverIssuer == accountID_ ? srcId : accountID_;