Ejemplo n.º 1
0
 public PlatformManager()
 {
     managerTrade = ManagerTrade.Instance;
     userSettingsStorage = new UserSettingsStorage();
     walletRepository = new WalletRepository();
     accountRepository = AccountRepository.Instance;
 }
Ejemplo n.º 2
0
        private AccountCheckStream()
        {
            walletRepository = new WalletRepository();
            accountRepository = AccountRepository.Instance;
            orderRepository = OrderRepository.Instance;
            profitCalculator = ProfitCalculator.Instance;
            tradeManager = ManagerTrade.Instance.tradeManager;
            brokerRepository = new BrokerRepository();

            threadIntervalMils = AppConfig.GetIntParam("CheckLoop.Interval", 100);

            schedules = new[]
                {
                    new Schedule(CheckOrders, AppConfig.GetIntParam("CheckLoop.IntervalOrders", 300)),
                    new Schedule(CheckMargin, AppConfig.GetIntParam("CheckLoop.IntervalMargin", 15000)),
                    new Schedule(CheckSwap, AppConfig.GetIntParam("CheckLoop.IntervalSwap", 1000)),
                    new Schedule(RenewSubscriptions, AppConfig.GetIntParam("CheckLoop.UpdateSubscriptions", 1000))
                };

            // параметры начисления свопов
            var dicMetadata = brokerRepository.GetMetadataByCategory("SWAP");
            object swapHourGmtObj, minutesToCheckSwapObj;
            if (!dicMetadata.TryGetValue("Hour.GMT", out swapHourGmtObj))
                swapHourGmtObj = 21;
            swapCheckHourGmt = (int) swapHourGmtObj;

            if (!dicMetadata.TryGetValue("MinutesToCheck", out minutesToCheckSwapObj))
                minutesToCheckSwapObj = 0;
            minutesToCheckSwap = (int)minutesToCheckSwapObj;
        }
Ejemplo n.º 3
0
        public ManagementController(IAccountRepository accountRepository, ISpotRepository spotRepository,
            IPositionRepository positionRepository, IAccountGroupsRepository accountGroupsRepository, IDealerRepository dealerRepository,
            IWalletRepository walletRepository, IPaymentTransferRepository paymentTransferRepository, IUserRepository userRepository,
            ITradeSignalRepository tradeSignalRepository)
        {
            this.accountRepository = accountRepository;
            this.accountGroupsRepository = accountGroupsRepository;
            this.spotRepository = spotRepository;
            this.positionRepository = positionRepository;
            this.dealerRepository = dealerRepository;
            this.walletRepository = walletRepository;

            this.paymentTransferRepository = paymentTransferRepository;
            this.userRepository = userRepository;
            this.tradeSignalRepository = tradeSignalRepository;
        }
 public WalletService(IWalletRepository walletRepository, IUnitOfWork unitOfWork)
 {
     _walletRepository = walletRepository;
     _unitOfWork       = unitOfWork;
 }
Ejemplo n.º 5
0
 public WalletService(IWalletRepository walletsRepository, IMapper mapper)
 {
     this.mapper            = mapper;
     this.walletsRepository = walletsRepository;
 }
Ejemplo n.º 6
0
 public WalletCommandHandler(IWalletRepository repository, IClientRepository clientRepository, ICurrencyTypeRepository currencyTypeRepository)
 {
     _repository             = repository;
     _clientRepository       = clientRepository;
     _currencyTypeRepository = currencyTypeRepository;
 }
Ejemplo n.º 7
0
 public WalletController(IWalletRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 8
0
 public WalletController(IWalletService walletService, IWalletRepository walletRepository, IPopupService popupService) : base(popupService)
 {
     this.walletService    = walletService;
     this.walletRepository = walletRepository;
 }
 public RequestAddNewCreditCardHandler(IUserRepository userRepository, IWalletRepository walletRepository, IWalletService walletService)
 {
     _walletService    = walletService;
     _userRepository   = userRepository;
     _walletRepository = walletRepository;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Cria um tratador para o evento de Criação de uma nova Wallet
 /// </summary>
 /// <param name="repository">Repositório da Wallet</param>
 public CreateWalletHandler(IWalletRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 11
0
 public WalletController(IMapper mapper, IWalletRepository walletRepository)
 {
     _mapper           = mapper;
     _walletRepository = walletRepository;
 }
Ejemplo n.º 12
0
 public InMemoryInvoiceRepository(InMemoryDbContext context, ICardHolderRepository cardHolders, IWalletRepository wallets)
 {
     _db          = context;
     _cardHolders = cardHolders;
     _wallets     = wallets;
 }
Ejemplo n.º 13
0
 public UserController(UserManager <ApplicationUser> userManager, IUserMainCurrencyRepository userMainCurrencyRepository, ILogger <UserController> logger, IWalletRepository walletRepository)
 {
     _userManager = userManager;
     _userMainCurrencyRepository = userMainCurrencyRepository;
     _logger           = logger;
     _walletRepository = walletRepository;
 }
Ejemplo n.º 14
0
        public CustomersController(ApplicationDbContext context, IWebHostEnvironment hostingEnvironment, IJobRepository jobRepository = null, ILogger <HomeController> logger = null, IProposalRepository proposalRepository = null, IWalletRepository walletRepository = null)
        {
            currentUser           = RegisterModel.registeredUser;
            this.walletRepository = walletRepository;
            _logger             = logger;
            this.jobRepository  = jobRepository;
            _context            = context;
            _hostingEnvironment = hostingEnvironment;
            string sellerCode       = "0778";
            string successUrlReturn = "https://localhost:44346/Customers/Success";                 //"YOUR_SUCCESS_URL";
            string ipnUrlReturn     = "https://localhost:44346/Freelancer/IPNDestination";         //"YOUR_IPN_URL";
            string cancelUrlReturn  = "https://localhost:44346/Freelancer/PaymentCancelReturnUrl"; //"YOUR_CANCEL_URL";
            string failureUrlReturn = "";                                                          //"YOUR_FAILURE_URL";
            bool   useSandBox       = true;

            checkoutoptions = new CheckoutOptions(sellerCode, string.Empty, CheckoutType.Express, useSandBox, null, successUrlReturn, cancelUrlReturn, ipnUrlReturn, failureUrlReturn);
        }
Ejemplo n.º 15
0
 public MicroKolController(IAccountBusiness __IAccountBusiness, IAccountRepository __IAccountRepository,
                           IAccountCampaignChargeRepository __IAccountCampaignChargeRepository,
                           IAccountCampaignChargeBusiness __IAccountCampaignChargeBusiness, ICampaignBusiness __ICampaignBusiness,
                           ICampaignAccountRepository __ICampaignAccountRepository, ITransactionRepository __ITransactionRepository,
                           ITransactionBusiness __ITransactionBusiness, IWalletBusiness __IWalletBusiness, IWalletRepository __IWalletRepository,
                           INotificationBusiness __INotificationBusiness, IWalletService ___WalletService, INotificationService __INotificationService)
 {
     _IAccountBusiness   = __IAccountBusiness;
     _IAccountRepository = __IAccountRepository;
     _IAccountCampaignChargeRepository = __IAccountCampaignChargeRepository;
     _IAccountCampaignChargeBusiness   = __IAccountCampaignChargeBusiness;
     _ICampaignBusiness          = __ICampaignBusiness;
     _ICampaignAccountRepository = __ICampaignAccountRepository;
     _ITransactionRepository     = __ITransactionRepository;
     _ITransactionBusiness       = __ITransactionBusiness;
     _IWalletBusiness            = __IWalletBusiness;
     _IWalletRepository          = __IWalletRepository;
     _INotificationBusiness      = __INotificationBusiness;
     _WalletService        = ___WalletService;
     _INotificationService = __INotificationService;
 }
Ejemplo n.º 16
0
 public WalletController(WalletContext db)
 {
     _wallet = new WalletRepository(db);
 }
Ejemplo n.º 17
0
        /// <summary>
        /// Creates a new wallet.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="password">The password.</param>
        /// <returns>The generated wallet.</returns>
        public (Features.Wallet.Wallet, ExtKey) GenerateBlankWallet(string name, string password, IWalletRepository walletRepository = null)
        {
            (Features.Wallet.Wallet newWallet, ExtKey extKey) = WalletTestsHelpers.GenerateBlankWalletWithExtKey(name, password, walletRepository);

            return(newWallet, extKey);
        }
Ejemplo n.º 18
0
        public static (Features.Wallet.Wallet wallet, ExtKey key) GenerateBlankWalletWithExtKey(string name, string password, IWalletRepository walletRepository = null)
        {
            var     mnemonic      = new Mnemonic(Wordlist.English, WordCount.Twelve);
            ExtKey  extendedKey   = mnemonic.DeriveExtKey(password);
            Network network       = walletRepository?.Network ?? KnownNetworks.Main;
            string  encryptedSeed = extendedKey.PrivateKey.GetEncryptedBitcoinSecret(password, network).ToWif();

            var wallet = new Features.Wallet.Wallet(name, encryptedSeed, extendedKey.ChainCode, walletRepository: walletRepository)
            {
                Network = network
            };

            wallet.AccountsRoot = new List <AccountRoot> {
                new AccountRoot(wallet)
                {
                    CoinType = (CoinType)network.Consensus.CoinType
                }
            };

            return(wallet, extendedKey);
        }
 public PassWalletItemsController(IWalletRepository walletRepository)
 {
     _walletRepository = walletRepository;
 }
Ejemplo n.º 20
0
 public TransferBetweenAccountsHandler(IWalletRepository walletRepository) => _walletRepository = walletRepository;
Ejemplo n.º 21
0
 public WalletBL(IWalletRepository repository, IMapper mapper, ICryptoBL cryptoBL)
 {
     _repository = repository;
     _mapper     = mapper;
     _cryptoBL   = cryptoBL;
 }
Ejemplo n.º 22
0
 public PaymentMethodService(IPaymentMethodRepository paymentMethodRepository, IWalletRepository walletRepository, ITransactionRepository transactionRepository)
 {
     this._paymentMethodRepository = paymentMethodRepository;
     this._walletRepository        = walletRepository;
     this._transactionRepository   = transactionRepository;
 }
Ejemplo n.º 23
0
 private void Initialize()
 {
     _walletService    = Substitute.For <IWalletService>();
     _userRepository   = Substitute.For <IUserRepository>();
     _walletRepository = Substitute.For <IWalletRepository>();
 }
 public DeleteByOwnerCommandHandler(IWalletRepository repo)
 {
     _repo = repo;
 }
Ejemplo n.º 25
0
 public WalletConfigurationService(ILogger <WalletConfigurationService> log, ICommonRepository <WalletTypeMaster> WalletTypeMasterRepository, ILogger <BasePage> logger, IWalletRepository walletRepository) : base(logger)
 {
     _log = log;
     _WalletTypeMasterRepository = WalletTypeMasterRepository;
     _walletRepository           = walletRepository;
 }
Ejemplo n.º 26
0
 public WalletsController(IWalletRepository walletRepository, IUserRepository userRepository, ILogger <WalletsController> logger)
 {
     _walletRepository = walletRepository;
     _userRepository   = userRepository;
     _logger           = logger;
 }
 public AuthenticateCommandHandler(IUserRepository userRepository,
                                   IWalletRepository walletRepository)
 {
     _userRepository   = userRepository;
     _walletRepository = walletRepository;
 }
 public AssignmentUserToWalletService(IWalletRepository walletRepository, IUserManager userManager, IEmailService emailService)
 {
     _walletRepository = walletRepository;
     _userManager      = userManager;
     _emailService     = emailService;
 }
Ejemplo n.º 29
0
 public WalletService(IWalletRepository walletRepository, IUserRepository userRepository, IMapper mapper)
 {
     _walletRepository = walletRepository;
     _userRepository   = userRepository;
     _mapper           = mapper;
 }
Ejemplo n.º 30
0
 public WalletPermissionService(IWalletRepository walletRepository)
 {
     _walletRepository = walletRepository;
 }
 public FinancialTransactionHandler(IWalletRepository walletRepository, ITransactionCategoryRepository financialCategoryRepository)
 {
     _walletRepository            = walletRepository;
     _financialCategoryRepository = financialCategoryRepository;
 }
Ejemplo n.º 32
0
 public TransactionService(IUserRepository userRepository, IWalletRepository walletRepository)
 {
     _userRepository   = userRepository;
     _walletRepository = walletRepository;
 }
Ejemplo n.º 33
0
 public WalletService(IWalletRepository walletRepository)
 {
     _walletRepository = walletRepository;
 }
Ejemplo n.º 34
0
 public WalletManager()
 {
     walletRepository = new WalletRepository();
     profitCalculator = ProfitCalculator.Instance;
     accountRepository = AccountRepository.Instance;
 }