make two decimals for reward_details

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-01-23 21:58:23 +03:00
parent a365acc2a1
commit 9e045ca6cc
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ impl RewardDetails {
"blocked".to_string()
} else {
let result = self.commission as f64 / 1_000_000_000.0;
format!("{:.1}%", result)
format!("{:.2}%", result)
}
}
}

View File

@ -110,5 +110,5 @@ pub fn prepare_perbill_fraction_string(value: Perbill) -> String {
m /= 10;
}
format!("{}.{}%", units, rest / m)
format!("{}.{:02}%", units, rest / m)
}