Showing warning hint on stores listing page

This commit is contained in:
rockstardev
2020-10-16 00:35:53 -05:00
parent f5c90bebdc
commit 75dcdc72d2
4 changed files with 42 additions and 45 deletions

View File

@@ -5,6 +5,7 @@ using BTCPayServer.Models;
using BTCPayServer.Models.StoreViewModels;
using BTCPayServer.Security;
using BTCPayServer.Services.Stores;
using ExchangeSharp;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
@@ -125,12 +126,15 @@ namespace BTCPayServer.Controllers
for (int i = 0; i < stores.Length; i++)
{
var store = stores[i];
var blob = store.GetStoreBlob();
result.Stores.Add(new StoresViewModel.StoreViewModel()
{
Id = store.Id,
Name = store.StoreName,
WebSite = store.StoreWebsite,
IsOwner = store.Role == StoreRoles.Owner
IsOwner = store.Role == StoreRoles.Owner,
HintWalletWarning = blob.Hints.Wallet
});
}
return View(result);