mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
After a utxo rescan, the cached balance should be invalidated
This commit is contained in:
parent
a9e08dd587
commit
20d653798c
@ -102,7 +102,7 @@ namespace BTCPayServer.Controllers
|
||||
CustomCSSLink = settings.CustomCSSLink,
|
||||
CustomLogoLink = storeBlob.CustomLogo,
|
||||
AppId = appId,
|
||||
Store = store,
|
||||
StoreId = store.Id,
|
||||
Description = settings.Description,
|
||||
EmbeddedCSS = settings.EmbeddedCSS,
|
||||
RequiresRefundEmail = settings.RequiresRefundEmail
|
||||
|
@ -1158,6 +1158,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
await explorer.ScanUTXOSetAsync(paymentMethod.AccountDerivation, vm.BatchSize, vm.GapLimit,
|
||||
vm.StartingIndex);
|
||||
_walletProvider.GetWallet(walletId.CryptoCode).InvalidateCache(paymentMethod.AccountDerivation);
|
||||
}
|
||||
catch (NBXplorerException ex) when (ex.Error.Code == "scanutxoset-in-progress")
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using BTCPayServer.Data;
|
||||
using BTCPayServer.Services.Apps;
|
||||
|
||||
namespace BTCPayServer.Models.AppViewModels
|
||||
@ -66,7 +65,6 @@ namespace BTCPayServer.Models.AppViewModels
|
||||
[Display(Name = "Custom CSS Code")]
|
||||
public string EmbeddedCSS { get; set; }
|
||||
public RequiresRefundEmail RequiresRefundEmail { get; set; } = RequiresRefundEmail.InheritFromStore;
|
||||
|
||||
public StoreData Store { get; set; }
|
||||
public string StoreId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
@using BTCPayServer.Models.AppViewModels
|
||||
@using BTCPayServer.Payments.Lightning
|
||||
@using BTCPayServer.Services.Stores
|
||||
@using LNURL
|
||||
@inject BTCPayNetworkProvider BTCPayNetworkProvider
|
||||
@inject StoreRepository StoreRepository
|
||||
@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel
|
||||
|
||||
<style>
|
||||
@ -16,11 +18,12 @@
|
||||
</style>
|
||||
|
||||
@{
|
||||
var store = await StoreRepository.FindStore(Model.StoreId);
|
||||
Layout = "_LayoutPos";
|
||||
Context.Request.Query.TryGetValue("cryptocode", out var cryptoCodeValues);
|
||||
var cryptoCode = cryptoCodeValues.FirstOrDefault() ?? "BTC";
|
||||
var supported = Model.Store.GetSupportedPaymentMethods(BTCPayNetworkProvider).OfType<LNURLPaySupportedPaymentMethod>().OrderBy(method => method.CryptoCode == cryptoCode).FirstOrDefault();
|
||||
if (supported != null && !Model.Store.GetEnabledPaymentIds(BTCPayNetworkProvider).Contains(supported.PaymentId))
|
||||
var supported = store.GetSupportedPaymentMethods(BTCPayNetworkProvider).OfType<LNURLPaySupportedPaymentMethod>().OrderBy(method => method.CryptoCode == cryptoCode).FirstOrDefault();
|
||||
if (supported != null && !store.GetEnabledPaymentIds(BTCPayNetworkProvider).Contains(supported.PaymentId))
|
||||
{
|
||||
supported = null;
|
||||
}
|
||||
@ -30,7 +33,7 @@
|
||||
{
|
||||
<div class="alert alert-warning text-center sticky-top mb-0 rounded-0" role="alert">
|
||||
LNURL is not enabled on your store, which this print feature relies on.
|
||||
<a asp-controller="UIStores" asp-action="LightningSettings" asp-route-cryptoCode="BTC" asp-route-storeId="@Model.Store.Id" class="alert-link p-0">
|
||||
<a asp-controller="UIStores" asp-action="LightningSettings" asp-route-cryptoCode="BTC" asp-route-storeId="@store.Id" class="alert-link p-0">
|
||||
Enable LNURL
|
||||
</a>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user