mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
fix PadRight formatter
This commit is contained in:
parent
26241be6fa
commit
9c9c102e74
1 changed files with 2 additions and 1 deletions
|
@ -230,7 +230,8 @@ namespace BTCPayServer.Controllers
|
|||
string ShowMoney(Money money)
|
||||
{
|
||||
if (!divisibility.HasValue) return money.ToString();
|
||||
var format = $"0{(divisibility.Value > 0 ? "." : string.Empty)}".PadRight(divisibility.Value, '0');
|
||||
var res = $"0{(divisibility.Value > 0 ? "." : string.Empty)}";
|
||||
var format = res.PadRight(divisibility.Value + res.Length, '0');
|
||||
return money.ToDecimal(MoneyUnit.BTC).ToString(format, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue