Пример #1
0
        public GraftService(ILoggerFactory loggerFactory,
                            IConfiguration configuration)
        {
            _settings = configuration
                        .GetSection("PaymentService")
                        .Get <PaymentsConfiguration>();

            _logger = loggerFactory.CreateLogger(nameof(GraftService));

            _dapi   = new GraftDapi(_settings.DapiUrl);
            _wallet = new Wallet(_settings.GraftWalletUrl);
        }
Пример #2
0
        public PaymentService(ILoggerFactory loggerFactory,
                              IConfiguration configuration,
                              ApplicationDbContext db,
                              IRateCache rateCache,
                              IMemoryCache cache,
                              IExchangeBroker broker,
                              IHttpContextAccessor context,
                              GraftService graft)
        {
            _settings = configuration
                        .GetSection("PaymentService")
                        .Get <PaymentsConfiguration>();

            _logger    = loggerFactory.CreateLogger(nameof(PaymentService));
            _db        = db;
            _rateCache = rateCache;
            _cache     = cache;
            _broker    = broker;
            _context   = context;
            _graft     = graft;
        }