Remove replace hardcoded BTC string to default network (#3654)

This commit is contained in:
Nicolas Dorier
2022-04-20 10:20:39 +09:00
committed by GitHub
parent 75afd30008
commit 2e08c29c64
6 changed files with 13 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ namespace BTCPayServer.Components.StoreNumbers;
public class StoreNumbers : ViewComponent
{
private const string CryptoCode = "BTC";
private string CryptoCode;
private const int TransactionDays = 7;
private readonly StoreRepository _storeRepo;
@@ -35,6 +35,7 @@ public class StoreNumbers : ViewComponent
_walletProvider = walletProvider;
_networkProvider = networkProvider;
_dbContextFactory = dbContextFactory;
CryptoCode = networkProvider.DefaultNetwork.CryptoCode;
}
public async Task<IViewComponentResult> InvokeAsync(StoreData store)