From 401d130f03bebebf3087c4b085dd20bf324462ab Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Sep 2026 21:34:02 +0800 Subject: [PATCH] fix(revenue): define AssetAmount::commission_from_minor used by commission pool The commission-pool rewrite called AssetAmount::commission_from_minor(int) in 5 places but only a commission(string) helper was defined, causing a fatal on the revenue panel. Replace it with the int-minor variant the callers expect. --- src/Ledger/AssetAmount.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ledger/AssetAmount.php b/src/Ledger/AssetAmount.php index 76ba2a8a..cc477333 100644 --- a/src/Ledger/AssetAmount.php +++ b/src/Ledger/AssetAmount.php @@ -40,8 +40,8 @@ final class AssetAmount { /** * 佣金池与余额同为两位小数、同一 minor 口径,仅资产标签不同。 */ - public static function commission(string $decimal): self { - return new self(AssetType::COMMISSION, self::balance($decimal)->minor()); + public static function commission_from_minor(int $minor): self { + return self::from_minor(AssetType::COMMISSION, $minor); } public static function decimal_from_minor(int $minor): string {