mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
fix PadRight formatter
This commit is contained in:
@@ -230,7 +230,8 @@ namespace BTCPayServer.Controllers
|
|||||||
string ShowMoney(Money money)
|
string ShowMoney(Money money)
|
||||||
{
|
{
|
||||||
if (!divisibility.HasValue) return money.ToString();
|
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);
|
return money.ToDecimal(MoneyUnit.BTC).ToString(format, CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user