Exemplo n.º 1
0
        public async Task <Wallet> LoadWalletTransactions(Wallet wallet)
        {
            List <Transaction> transactions = await _storage.GetAllAsyncForObject(wallet);

            foreach (var transaction in transactions)
            {
                wallet.AddTransaction(AuthenticationService.CurrentUser, transaction);
            }
            return(wallet);
        }
Exemplo n.º 2
0
        public async Task <User> LoadUserWallets(User user)
        {
            var             transactService = new TransactionService();
            List <WalletDb> wallets         = await _storage.GetAllAsyncForObject(user);

            foreach (var wallet in wallets)
            {
                Wallet wallet_cr = Wallet.CreateWalletForUser(user, wallet.Name, wallet.CurrBalance, wallet.Description, wallet.Currency, wallet.Guid);
                await transactService.LoadWalletTransactions(wallet_cr);
            }
            return(user);
        }