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:
1 parent
61667aa03c
commit
401d130f03
1 file changed
+2
-2
@@ -40,8 +40,8 @@ final class AssetAmount {
|
|||||||
/**
|
/**
|
||||||
* 佣金池与余额同为两位小数、同一 minor 口径,仅资产标签不同。
|
* 佣金池与余额同为两位小数、同一 minor 口径,仅资产标签不同。
|
||||||
*/
|
*/
|
||||||
public static function commission(string $decimal): self {
|
public static function commission_from_minor(int $minor): self {
|
||||||
return new self(AssetType::COMMISSION, self::balance($decimal)->minor());
|
return self::from_minor(AssetType::COMMISSION, $minor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function decimal_from_minor(int $minor): string {
|
public static function decimal_from_minor(int $minor): string {
|
||||||
|
|||||||
Reference in new issue
Block a user