public void CanGetBalance(string wallet) { var wallets = _bitcoindClient.GetBalanceAsync(wallet).Result; //_dataContext.Database.EnsureCreated(); //var walls = _dataContext.HotWallets.ToList(); //_dataContext.BulkInsertOrUpdate(parsedAddresses); //var newwalls = _dataContext.HotWallets.ToList(); }
public async Task <List <HotWallet> > GetWalletsAsync() { var balances = new List <HotWallet>(); var wallets = await _bitcoindClient.GetListWalletsAsync(); foreach (var wallet in wallets) { var balance = await _bitcoindClient.GetBalanceAsync(wallet); balances.Add(new HotWallet { Address = wallet, Balance = balance }); } return(balances); }