예제 #1
0
        public void WithdrawVakacoin()
        {
            var walletRepository =
                _vakapayRepositoryFactory.GetWalletRepository(_vakapayRepositoryFactory.GetOldConnection());
            var userRepo = _vakapayRepositoryFactory.GetUserRepository(_vakapayRepositoryFactory.GetOldConnection());
            var wallet   = walletRepository.FindByUserAndNetwork(
                userRepo.FindByEmailAddress("*****@*****.**").Id,
                CryptoCurrency.VAKA);

            var res = _walletBusiness.Withdraw(wallet, "useraaaaaaab", (decimal)0.0001, 0);

            Assert.AreEqual(res.Status, Status.STATUS_SUCCESS);
        }
예제 #2
0
        public void InsertPendingTxsToWithdraw(string walletId, string toAddr)
        {
            var repositoryConfig = new RepositoryConfiguration()
            {
                ConnectionString = AppSettingHelper.GetDbConnection()
            };

            var persistence = new VakapayRepositoryMysqlPersistenceFactory(repositoryConfig);

            _walletBusiness =
                new Vakapay.WalletBusiness.WalletBusiness(persistence);

            var wallet = new Wallet();

            wallet.Id = walletId;

            ReturnObject resultTest = null;

            resultTest = _walletBusiness.Withdraw(wallet, toAddr, 1000000000000000000000m, 0);


            Console.WriteLine(JsonHelper.SerializeObject(resultTest));
            Assert.AreEqual(Status.STATUS_SUCCESS, resultTest.Status);
        }