public NBXplorerWaiters(NBXplorerDashboard dashboard, ExplorerClientProvider explorerClientProvider, EventAggregator eventAggregator) { foreach (var explorer in explorerClientProvider.GetAll()) { _Waiters.Add(new NBXplorerWaiter(dashboard, explorer.Item1, explorer.Item2, eventAggregator)); } }
public void SetCryptoCurrencies(ExplorerClientProvider explorerProvider, string defaultCrypto) { var choices = explorerProvider.GetAll().Select(o => new Format() { Name = o.Item1.CryptoCode, Value = o.Item1.CryptoCode }).ToArray(); var chosen = choices.FirstOrDefault(f => f.Value == defaultCrypto) ?? choices.FirstOrDefault(); CryptoCurrencies = new SelectList(choices, nameof(chosen.Value), nameof(chosen.Name), chosen); DefaultCryptoCurrency = chosen.Name; }
private void AddDerivationSchemes(StoreData store, StoreViewModel vm) { var strategies = store .GetDerivationStrategies(_NetworkProvider) .ToDictionary(s => s.Network.CryptoCode); foreach (var explorerProvider in _ExplorerProvider.GetAll()) { if (strategies.TryGetValue(explorerProvider.Item1.CryptoCode, out DerivationStrategy strat)) { vm.DerivationSchemes.Add(new StoreViewModel.DerivationScheme() { Crypto = explorerProvider.Item1.CryptoCode, Value = strat.DerivationStrategyBase.ToString() }); } } }