Skip to content

Commit

Permalink
Correctly show the days till penalty recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
dangershony committed Dec 6, 2023
1 parent db8f6ab commit f137acd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/Angor/Client/Pages/Recover.razor
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
{
<button class="btn btn-primary" @onclick="PrepareEndOfProjectCoins">End of project</button>
}


<br/>
<br />
<table class="table">
<thead>
<tr>
Expand Down Expand Up @@ -343,8 +345,8 @@
else
{
item.ProjectScriptType = new ProjectScriptType { ScriptType = ProjectScriptTypeEnum.InvestorWithPenalty };
var days = (penaltyExpieryDate - DateTime.Now).Days;
item.SpentTo = days > 0 ? $"Penalty, released in {days} days" : "Penalty can be released";
var days = (penaltyExpieryDate - DateTime.Now).TotalDays;
item.SpentTo = days > 0 ? $"Penalty, released in {days.ToString("0.0")} days" : "Penalty can be released";
}
}
else
Expand All @@ -367,8 +369,8 @@
}
case ProjectScriptTypeEnum.InvestorWithPenalty:
{
var days = (penaltyExpieryDate - DateTime.Now).Days;
item.SpentTo = days > 0 ? $"Penalty, released in {days} days" : "Penalty can be released";
var days = (penaltyExpieryDate - DateTime.Now).TotalDays;
item.SpentTo = days > 0 ? $"Penalty, released in {days.ToString("0.0")} days" : "Penalty can be released";
break;
}
case ProjectScriptTypeEnum.EndOfProject:
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Signatures.razor
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
@foreach (var signature in pendingSignatures.Where(_ => _.TransactionHex != null))
{
<tr>
<td>@signature.AmountToInvest @network.CoinTicker</td>
<td>@Money.Satoshis(signature.AmountToInvest).ToUnit(MoneyUnit.BTC) @network.CoinTicker</td>
<td>@signature.TimeArrived.ToString("g")</td>
<td>
<button class="btn btn-success" @onclick="() => ApproveSignature(signature)">Approve</button>
Expand Down

0 comments on commit f137acd

Please sign in to comment.