Ejemplo n.º 1
0
 public WalletHistogramService(
     BTCPayNetworkProvider networkProvider,
     NBXplorerConnectionFactory connectionFactory)
 {
     _networkProvider   = networkProvider;
     _connectionFactory = connectionFactory;
 }
Ejemplo n.º 2
0
 public BTCPayWallet(ExplorerClient client, IMemoryCache memoryCache, BTCPayNetwork network,
                     ApplicationDbContextFactory dbContextFactory, NBXplorerConnectionFactory nbxplorerConnectionFactory, Logs logs)
 {
     ArgumentNullException.ThrowIfNull(client);
     ArgumentNullException.ThrowIfNull(memoryCache);
     Logs                       = logs;
     _Client                    = client;
     _Network                   = network;
     _dbContextFactory          = dbContextFactory;
     NbxplorerConnectionFactory = nbxplorerConnectionFactory;
     _MemoryCache               = memoryCache;
 }
Ejemplo n.º 3
0
 public StoreNumbers(
     StoreRepository storeRepo,
     ApplicationDbContextFactory dbContextFactory,
     BTCPayNetworkProvider networkProvider,
     BTCPayWalletProvider walletProvider,
     NBXplorerConnectionFactory nbxConnectionFactory)
 {
     _storeRepo            = storeRepo;
     _walletProvider       = walletProvider;
     _nbxConnectionFactory = nbxConnectionFactory;
     _networkProvider      = networkProvider;
     _dbContextFactory     = dbContextFactory;
 }
Ejemplo n.º 4
0
 public StoreRecentTransactions(
     StoreRepository storeRepo,
     BTCPayNetworkProvider networkProvider,
     NBXplorerConnectionFactory connectionFactory,
     BTCPayWalletProvider walletProvider,
     ApplicationDbContextFactory dbContextFactory)
 {
     _storeRepo        = storeRepo;
     NetworkProvider   = networkProvider;
     ConnectionFactory = connectionFactory;
     _walletProvider   = walletProvider;
     _dbContextFactory = dbContextFactory;
     CryptoCode        = networkProvider.DefaultNetwork.CryptoCode;
 }
Ejemplo n.º 5
0
        public BTCPayWalletProvider(ExplorerClientProvider client,
                                    IOptions <MemoryCacheOptions> memoryCacheOption,
                                    Data.ApplicationDbContextFactory dbContextFactory,
                                    BTCPayNetworkProvider networkProvider,
                                    NBXplorerConnectionFactory nbxplorerConnectionFactory,
                                    Logs logs)
        {
            ArgumentNullException.ThrowIfNull(client);
            this.Logs        = logs;
            _Client          = client;
            _NetworkProvider = networkProvider;
            _Options         = memoryCacheOption;

            foreach (var network in networkProvider.GetAll().OfType <BTCPayNetwork>())
            {
                var explorerClient = _Client.GetExplorerClient(network.CryptoCode);
                if (explorerClient == null)
                {
                    continue;
                }
                _Wallets.Add(network.CryptoCode.ToUpperInvariant(), new BTCPayWallet(explorerClient, new MemoryCache(_Options), network, dbContextFactory, nbxplorerConnectionFactory, Logs));
            }
        }