From 95488f977217b27878db205b501944fea723e1ed Mon Sep 17 00:00:00 2001 From: nfel Date: Sun, 30 Aug 2026 20:34:54 +0330 Subject: [PATCH] docs: record discount policy extraction --- REFACTORING-AUDIT.md | 1 + REFACTORING-TODO.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/REFACTORING-AUDIT.md b/REFACTORING-AUDIT.md index 9459bd4..9961bcf 100644 --- a/REFACTORING-AUDIT.md +++ b/REFACTORING-AUDIT.md @@ -474,3 +474,4 @@ Migration order implied by the map: isolate shared infrastructure constructors ( - Removed the redundant `agreementAmountMatches` wrapper and routed ICO agreement checks/tests directly to `application/market.AgreementAmountMatches`; focused market tests pass in `261c6a1`. - Removed the redundant `core/walletImp/ipg_amount.go` shim and routed IPG Toman/Rial conversion callers/tests directly to `application/deposit`; focused Wallet tests pass in `1493486`. - Removed the redundant `nationalIdToPayerID` wrapper and routed IPG payer-ID generation directly to `application/deposit.PayerID`; focused Wallet tests pass in `c710cdc`. +- Discount amount calculation (percentage + static amount with max cap) now uses `application/discount.CalculateAmount`; wallet callers/tests route directly to the application policy. Focused Wallet tests pass in `ccff76e`. diff --git a/REFACTORING-TODO.md b/REFACTORING-TODO.md index 26df5a8..eb9a94f 100644 --- a/REFACTORING-TODO.md +++ b/REFACTORING-TODO.md @@ -331,4 +331,4 @@ Append one row whenever a task changes status. Existing rows are never rewritten | 2026-08-30 | W010 | `TODO` | `STARTED` | Added `application/cron.Retry`, `application/stream.IsNew`, stream external-deposit transaction policy, and dedicated `SetupCronRepository`/`SetupStreamRepository` paths. Focused Wallet tests pass in `db52f89`. Remaining process composition work remains. | | 2026-08-30 | W009 | `TODO` | `STARTED` | Added `application/walletlock` lock/release mutation policies with frozen/available balance tests; internal RPC retains transaction scope, ledger journaling, persistence, and error mapping. Focused Wallet tests pass in `382fd79`. Remaining internal-wallet operations stay at the service boundary. | | 2026-08-30 | W011 | `TODO` | `STARTED` | Added dedicated alert, market, internal-wallet, stream, cron, and wallet repository setup entry points; each mode now declares its bootstrap profile. Command/core tests pass in `cf13a58`. Dependency internals and superseded bootstrap cleanup remain. | -| 2026-08-30 | W012 | `TODO` | `STARTED` | Removed redundant market amount/agreement and IPG amount/payer-ID delegation shims; callers/tests now use application policies directly. Focused Wallet tests pass in `c710cdc`. Remaining core implementation cleanup is pending. | +| 2026-08-30 | W012 | `TODO` | `STARTED` | Removed redundant market amount/agreement and IPG amount/payer-ID shims and moved discount calculation into `application/discount`; callers/tests now use application policies directly. Focused Wallet tests pass in `ccff76e`. Remaining core implementation cleanup is pending. |