コード例 #1
0
 public WalletController(IWalletService WalletService)
 {
     _WalletService = WalletService ?? throw new ArgumentException(nameof(WalletService));
     _WalletBLL     = new WalletBLL(_WalletService);
 }
コード例 #2
0
 public LTCConfirmSendApiService(ApiServiceAppSettings appSettings, IWalletService walletService)
 {
     AppSettings   = appSettings;
     WalletService = walletService;
 }
コード例 #3
0
 public SettlementRepository(CleanArchitectureContext dbContext, ICommonRepository <TradePoolQueue> TradePoolQueue,
                             ICommonRepository <TradeBuyRequest> TradeBuyRequest, ICommonRepository <TradeBuyerList> TradeBuyerList,
                             ICommonRepository <TradeSellerList> TradeSellerList, ICommonRepository <TradePoolMaster> TradePoolMaster,
                             ICommonRepository <PoolOrder> PoolOrder, EFCommonRepository <TransactionQueue> TransactionRepository,
                             EFCommonRepository <TradeTransactionQueue> TradeTransactionRepository, IWalletService WalletService,
                             ISignalRService ISignalRService, IFrontTrnService IFrontTrnService, ICommonRepository <TradeStopLoss> TradeStopLoss, IMediator mediator, IMessageConfiguration messageConfiguration, UserManager <ApplicationUser> userManager)
 {
     _dbContext = dbContext;
     //_logger = logger;
     _TradePoolQueue             = TradePoolQueue;
     _TradeBuyRequest            = TradeBuyRequest;
     _TradeBuyerList             = TradeBuyerList;
     _TradeSellerList            = TradeSellerList;
     _TradePoolMaster            = TradePoolMaster;
     _PoolOrder                  = PoolOrder;
     _TransactionRepository      = TransactionRepository;
     _TradeTransactionRepository = TradeTransactionRepository;
     _WalletService              = WalletService;
     _ISignalRService            = ISignalRService;
     _IFrontTrnService           = IFrontTrnService;
     _TradeStopLoss              = TradeStopLoss;
     _mediator             = mediator;
     _messageConfiguration = messageConfiguration;
     _userManager          = userManager;
 }
コード例 #4
0
 public AddMoneyManager(IAddMoneyDal addMoneyDal, IWalletService walletService)
 {
     _addMoneyDal   = addMoneyDal;
     _walletService = walletService;
 }
コード例 #5
0
 public WalletController(IWalletService walletService)
 {
     _walletService = walletService;
 }
コード例 #6
0
 public WalletController(IWalletService walletService,
                         IHubContext <OrderHub, IHubClient> hub)
 {
     this.walletService = walletService;
     this.hub           = hub;
 }
コード例 #7
0
 public WalletsController(IWalletService walletService, ICommandDispatcher commandDispatcher) : base(commandDispatcher)
 {
     _walletService = walletService;
 }
コード例 #8
0
 public IncomeApiController(IWalletService dataService)
 {
     _dataService = dataService;
 }
コード例 #9
0
 public LTCSyncBlockApiService(ApiServiceAppSettings appSettings, IWalletService walletService)
 {
     AppSettings   = appSettings;
     WalletService = walletService;
 }
コード例 #10
0
 public WalletBillController(ICurrencyService currencyService, IWalletService walletService)
 {
     _currencyService = currencyService;
     _walletService   = walletService;
 }
コード例 #11
0
 public WalletController(ILogger <WalletController> logger, IWalletService walletService)
 {
     _logger        = logger;
     _walletService = walletService;
 }
コード例 #12
0
 public WalletController(IWalletService walletService, UserManager <ApplicationUser> userManager)
 {
     this.walletService = walletService;
     this.userManager   = userManager;
 }
コード例 #13
0
 public AccountsController(IWalletService context)
 {
     _context = context;
 }
コード例 #14
0
        public WorldService(ICompanyEmployeeRepository companyEmployeeRepository, IContractRepository contractRepository, IContractService contractService,
                            ICitizenRepository citizenRepository, IConfigurationRepository configurationRepository, IEquipmentRepository equipmentRepository,
                            IPartyService partyService, ICongressCandidateService congressCandidateService, ICongressVotingService congressVotingService,
                            ICountryService countryService, IBattleService battleService, IRegionService regionService, ICompanyService companyService,
                            IEmbargoService embargoService, IWarService warService, IEmployeeService employeeService, IMPPService mppService, IWalletService walletService,
                            INewDayRepository newDayRepository, IHotelService hotelService, IHouseService houseService)
        {
            this.citizenRepository         = citizenRepository;
            this.configurationRepository   = configurationRepository;
            this.equipmentRepository       = equipmentRepository;
            this.companyEmployeeRepository = companyEmployeeRepository;
            this.contractRepository        = contractRepository;
            this.contractService           = contractService;
            this.partyService             = partyService;
            this.congressCandidateService = congressCandidateService;
            this.congressVotingService    = congressVotingService;
            this.countryService           = countryService;
            this.battleService            = battleService;
            this.regionService            = regionService;
            this.companyService           = companyService;
            this.embargoService           = embargoService;
            this.warService       = warService;
            this.employeeService  = employeeService;
            this.mppService       = mppService;
            this.walletService    = Attach(walletService);
            this.newDayRepository = newDayRepository;
            this.hotelService     = hotelService;
            this.houseService     = houseService;

            citizenRepository.SetTimeout(300);
            equipmentRepository.SetTimeout(300);
        }
コード例 #15
0
 public WalletController(IWalletService walletService)
 {
     this.walletService = walletService ?? throw new ArgumentNullException(nameof(walletService));
 }
コード例 #16
0
 public WalletController(UserManager <ApplicationUser> userManager, IWalletService walletService, ILogger <WalletController> logger)
     : base(userManager)
 {
     this.walletService = walletService;
     this.logger        = logger;
 }
コード例 #17
0
 public OrganisationService(IOrganisationRepository organisationRepository, IOrganisationAccessLogRepository organisationAccessLogRepository,
                            IEmailService emailService, IQRCodeService qrCodeService, IWalletRepository walletRepository, IWalletService walletService,
                            ISessionService sessionService, ISmsService smsService, ICryptoService cryptoService)
 {
     _organisationRepository          = organisationRepository;
     _organisationAccessLogRepository = organisationAccessLogRepository;
     _emailService     = emailService;
     _qrCodeService    = qrCodeService;
     _walletRepository = walletRepository;
     _walletService    = walletService;
     _sessionService   = sessionService;
     _smsService       = smsService;
     _cryptoService    = cryptoService;
 }
コード例 #18
0
 public BccTransactionService(IBccOutputService bccOutputService, [KeyFilter(Constants.BccKey)] ISpentOutputRepository spentOutputRepository,
                              [KeyFilter(Constants.BccKey)] RpcConnectionParams connectionParams, ITransactionBuildHelper transactionBuildHelper,
                              ISignatureApiProvider signatureApiProvider,
                              ILog log, [KeyFilter(Constants.BccKey)] IRpcBitcoinClient rpcBitcoinClient, IWalletService walletService,
                              IOffchainChannelRepository offchainChannelRepository,
                              ICommitmentRepository commitmentRepository
                              )
 {
     _bccOutputService       = bccOutputService;
     _spentOutputRepository  = spentOutputRepository;
     _connectionParams       = connectionParams;
     _transactionBuildHelper = transactionBuildHelper;
     _log = log;
     _rpcBitcoinClient          = rpcBitcoinClient;
     _walletService             = walletService;
     _offchainChannelRepository = offchainChannelRepository;
     _commitmentRepository      = commitmentRepository;
     _signatureApi = signatureApiProvider;
 }
 public WalletGrpcService(IWalletService walletService)
 {
     _walletService = walletService;
 }
コード例 #20
0
        public ConstructCompanyViewModel(Entities.Country country, IRegionRepository regionRepository, IWalletService walletService, ICountryTreasureService countryTreasuryService)
        {
            Info      = new CountryInfoViewModel(country);
            CountryID = country.ID;
            var regions = regionRepository.Where(r => r.CountryID == country.ID).
                          Select(r => new
            {
                Name = r.Name,
                ID   = r.ID
            }).ToList();

            Regions   = CreateSelectList(regions, r => r.Name, r => r.ID, true);
            Functions = ProductTypeEnumUtils.GetFunctionsList();

            GoldNeeded = new MoneyViewModel(GameHelper.Gold, ConfigurationHelper.Configuration.CompanyCountryFee);
            var walletID = Persistent.Countries.GetById(country.ID).Entity.WalletID;

            TreasureGold = new MoneyViewModel(walletService.GetWalletMoney(walletID, GameHelper.Gold.ID));

            CanSeeTreasury = countryTreasuryService.CanSeeCountryTreasure(country, SessionHelper.CurrentEntity).isSuccess;
        }
コード例 #21
0
 public WalletController(IWalletService walletService, ISignatureApiProvider signatureApiProvider)
 {
     _walletService     = walletService;
     _signatureProvider = signatureApiProvider;
 }
        public async Task Deposit_Deposit10_ReturnsOkPostDepositBalanceAsync()
        {
            //// Arrange

            decimal postDepositBalanceAmount = 20;
            decimal depositAmount            = 10;

            // Setup Mocks

            Mock <IWalletService> walletServiceMock = new Mock <IWalletService>();

            Balance postDepositBalance = new Balance()
            {
                Amount = postDepositBalanceAmount
            };
            Deposit deposit = new Deposit {
                Amount = depositAmount
            };

            walletServiceMock
            .Setup(walletService =>
                   walletService.DepositFundsAsync(It.Is <Deposit>(actualDeposit => _comparer.Compare(deposit, actualDeposit).AreEqual))
                   )
            .Returns(Task.FromResult(postDepositBalance));

            IWalletService walletService = walletServiceMock.Object;

            // Initialize HTTP client and request data

            WebApplicationFactory <Startup> factory = new CustomWebApplicationFactory <Startup>(services =>
                                                                                                services.SwapTransient(provider => walletService)
                                                                                                );
            HttpClient client = factory.CreateClient();

            string         endpoint       = "Wallet/Deposit";
            DepositRequest depositRequest = new DepositRequest {
                Amount = depositAmount
            };
            StringContent payload = depositRequest.AsStringContent();

            // Set Expectations

            BalanceResponse expectedBalanceResponse = new BalanceResponse()
            {
                Amount = postDepositBalanceAmount
            };

            //// Act

            HttpResponseMessage response = await client.PostAsync(endpoint, payload);

            BalanceResponse actualBalanceResponse = await response.Content.ReadAsAsync <BalanceResponse>(new[] { new JsonMediaTypeFormatter() });

            //// Assert

            Assert.Equal(HttpStatusCode.OK, response.StatusCode);

            actualBalanceResponse.ShouldCompare(expectedBalanceResponse);

            walletServiceMock.Verify(walletService => walletService.DepositFundsAsync(It.Is <Deposit>(
                                                                                          actualDeposit => _comparer.Compare(deposit, actualDeposit).AreEqual)
                                                                                      ), Times.Once);
            walletServiceMock.VerifyNoOtherCalls();
        }
コード例 #23
0
 public WalletAddressCommand(IServiceProvider serviceProvider)
 {
     _walletService = serviceProvider.GetService <IWalletService>();
     _console       = serviceProvider.GetService <IConsole>();
 }
コード例 #24
0
 public InvestorController(ITrustManagementService trustManagementService, IUserService userService, IInvestorValidator investorValidator, UserManager <ApplicationUser> userManager, IStatisticService statisticService, ITradesService tradesService, IWalletService walletService, ILogger <InvestorController> logger)
     : base(userManager)
 {
     this.trustManagementService = trustManagementService;
     this.investorValidator      = investorValidator;
     this.userService            = userService;
     this.statisticService       = statisticService;
     this.tradesService          = tradesService;
     this.walletService          = walletService;
     this.logger = logger;
 }
コード例 #25
0
 public WalletReceivePaymentCommand(IServiceProvider serviceProvider)
 {
     _walletService = serviceProvider.GetService <IWalletService>();
     _logger        = serviceProvider.GetService <ILogger <WalletReceivePaymentCommand> >();
 }
コード例 #26
0
 public WalletListCommand(IServiceProvider serviceProvider)
 {
     walletService = serviceProvider.GetService <IWalletService>();
     console       = serviceProvider.GetService <IConsole>();
 }
コード例 #27
0
 public WalletRestoreCommand(IServiceProvider serviceProvider)
 {
     _console       = serviceProvider.GetService <IConsole>();
     _walletService = serviceProvider.GetService <IWalletService>();
 }
コード例 #28
0
 public WalletController(IWalletService walletService, IWalletRepository walletRepository)
 {
     this.walletService    = walletService;
     this.walletRepository = walletRepository;
 }
コード例 #29
0
 public AccountApiController(IWalletService dataService)
 {
     _dataService = dataService;
 }
コード例 #30
0
ファイル: ApiGrpc.cs プロジェクト: tuxcanfly/Paymetheus
 // creates service definition that can be registered with a server
 public static ServerServiceDefinition BindService(IWalletService serviceImpl)
 {
   return ServerServiceDefinition.CreateBuilder(__ServiceName)
       .AddMethod(__Method_Ping, serviceImpl.Ping)
       .AddMethod(__Method_Network, serviceImpl.Network)
       .AddMethod(__Method_AccountNumber, serviceImpl.AccountNumber)
       .AddMethod(__Method_Accounts, serviceImpl.Accounts)
       .AddMethod(__Method_Balance, serviceImpl.Balance)
       .AddMethod(__Method_GetTransactions, serviceImpl.GetTransactions)
       .AddMethod(__Method_TransactionNotifications, serviceImpl.TransactionNotifications)
       .AddMethod(__Method_SpentnessNotifications, serviceImpl.SpentnessNotifications)
       .AddMethod(__Method_AccountNotifications, serviceImpl.AccountNotifications)
       .AddMethod(__Method_ChangePassphrase, serviceImpl.ChangePassphrase)
       .AddMethod(__Method_RenameAccount, serviceImpl.RenameAccount)
       .AddMethod(__Method_NextAccount, serviceImpl.NextAccount)
       .AddMethod(__Method_NextAddress, serviceImpl.NextAddress)
       .AddMethod(__Method_ImportPrivateKey, serviceImpl.ImportPrivateKey)
       .AddMethod(__Method_FundTransaction, serviceImpl.FundTransaction)
       .AddMethod(__Method_SignTransaction, serviceImpl.SignTransaction)
       .AddMethod(__Method_PublishTransaction, serviceImpl.PublishTransaction).Build();
 }
コード例 #31
0
 public BCHConfirmTransactionApiService(ApiServiceAppSettings appSettings, IWalletService walletService)
 {
     AppSettings   = appSettings;
     WalletService = walletService;
 }