mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-31 19:10:25 +00:00
Migrate AMMDeposit and AMMWithdraw to use the unified freeze helpers introduced for Vault and LoanBroker, gated on fixCleanup3_3_0. AMMDeposit: checkDepositFreeze for both pool assets replaces the two-layer checkAsset + checkAmount freeze logic. If either pool asset is frozen (depositor or AMM account), all deposits are blocked. AMMWithdraw: checkWithdrawFreeze per withdrawn amount replaces checkFrozen(AMM) + checkIndividualFrozen(user). Regular IOU freeze no longer blocks self-withdrawal; only deep freeze does. The issuer exemption allows the token issuer to withdraw from a frozen pool; issuerFreezeHandling() ensures doApply uses IgnoreFreeze so pool math does not divide by zero. Rename checkWithdrawFreezes -> checkWithdrawFreeze (singular) and update all callers. Document both helpers with full freeze semantics.