You've already forked AstralRinth
forked from didirus/AstralRinth
Enforce 2dp on payout withdrawals (#4829)
* fix mural withdraw amount * Enforce 2dp on all payout logic
This commit is contained in:
@@ -252,9 +252,9 @@ pub struct PayoutMethodFee {
|
||||
}
|
||||
|
||||
impl PayoutMethodFee {
|
||||
pub fn compute_fee(&self, value: Decimal) -> Decimal {
|
||||
pub fn compute_fee(&self, value: impl Into<Decimal>) -> Decimal {
|
||||
cmp::min(
|
||||
cmp::max(self.min, self.percentage * value),
|
||||
cmp::max(self.min, self.percentage * value.into()),
|
||||
self.max.unwrap_or(Decimal::MAX),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user