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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user