mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Show sync progress for monero and show amount of monero payment
This commit is contained in:
parent
aeb90a3674
commit
1c7185a574
@ -1,6 +1,7 @@
|
||||
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard
|
||||
|
||||
@if (!dashboard.IsFullySynched())
|
||||
@using BTCPayServer.Services.Altcoins.Monero.Services
|
||||
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard
|
||||
@inject MoneroRPCProvider MoneroRpcProvider
|
||||
@if (!dashboard.IsFullySynched() || !MoneroRpcProvider.Summaries.All(pair => pair.Value.WalletAvailable))
|
||||
{
|
||||
<!-- Modal -->
|
||||
<div id="modalDialog" class="modal-dialog animated bounceInRight"
|
||||
@ -76,6 +77,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<partial name="Monero/MoneroSyncSummary"/>
|
||||
<p>
|
||||
<a href="https://www.youtube.com/watch?v=OrYDehC-8TU" target="_blank">Watch this video</a> to understand the importance of blockchain synchronization.
|
||||
</p>
|
||||
|
20
BTCPayServer/Views/Shared/Monero/MoneroSyncSummary.cshtml
Normal file
20
BTCPayServer/Views/Shared/Monero/MoneroSyncSummary.cshtml
Normal file
@ -0,0 +1,20 @@
|
||||
@using BTCPayServer.Services.Altcoins.Monero.Services
|
||||
@inject MoneroRPCProvider MoneroRpcProvider
|
||||
@inject SignInManager<ApplicationUser> SignInManager;
|
||||
|
||||
@if (SignInManager.IsSignedIn(User) && User.IsInRole(Roles.ServerAdmin) && MoneroRpcProvider.Summaries.Any())
|
||||
{
|
||||
@foreach (var summary in MoneroRpcProvider.Summaries)
|
||||
{
|
||||
@if (summary.Value != null)
|
||||
{
|
||||
<h4>@summary.Key</h4>
|
||||
<ul >
|
||||
<li >Node available: @Model.Summary.DaemonAvailable</li>
|
||||
<li >Wallet available: @Model.Summary.WalletAvailable (@(Model.WalletFileFound ? "Wallet file present" : "Wallet file not found"))</li>
|
||||
<li >Last updated: @Model.Summary.UpdatedAt</li>
|
||||
<li >Synced: @Model.Summary.Synced (@Model.Summary.CurrentHeight / @Model.Summary.TargetHeight)</li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
@using System.Globalization
|
||||
@using BTCPayServer.Controllers
|
||||
@using BTCPayServer.Services.Altcoins.Monero.Payments
|
||||
@using BTCPayServer.Services.Altcoins.Monero.UI
|
||||
@model IEnumerable<BTCPayServer.Services.Invoices.PaymentEntity>
|
||||
@ -11,7 +10,7 @@
|
||||
var onChainPaymentData = payment.GetCryptoPaymentData() as MoneroLikePaymentData;
|
||||
m.Crypto = payment.GetPaymentMethodId().CryptoCode;
|
||||
m.DepositAddress = onChainPaymentData.GetDestination();
|
||||
|
||||
m.Amount = onChainPaymentData.GetValue().ToString(CultureInfo.InvariantCulture);
|
||||
var confirmationCount = onChainPaymentData.ConfirmationCount;
|
||||
var network = payment.Network as MoneroLikeSpecificBtcPayNetwork;
|
||||
if (confirmationCount >= network.MaxTrackedConfirmation)
|
||||
@ -40,6 +39,7 @@
|
||||
<tr>
|
||||
<th>Crypto</th>
|
||||
<th>Deposit address</th>
|
||||
<th>Amount</th>
|
||||
<th>Transaction Id</th>
|
||||
<th class="text-right">Confirmations</th>
|
||||
</tr>
|
||||
@ -50,6 +50,7 @@
|
||||
<tr >
|
||||
<td>@payment.Crypto</td>
|
||||
<td>@payment.DepositAddress</td>
|
||||
<td>@payment.Amount</td>
|
||||
<td>
|
||||
<div class="wraptextAuto">
|
||||
<a href="@payment.TransactionLink" target="_blank">
|
||||
|
Loading…
Reference in New Issue
Block a user