pass coins into coin list vm.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -11,13 +11,13 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public class CoinListViewModel : ViewModelBase
{
private ObservableCollection<CoinViewModel> _selectedCoins;
- private IEnumerable<CoinViewModel> _coins;
+ private IReactiveDerivedList<CoinViewModel> _coins;
- public CoinListViewModel()
+ public CoinListViewModel(IEnumerable<SmartCoin> coins)
{
SelectedCoins = new ObservableCollection<CoinViewModel>();
- Coins = Global.WalletService.Coins.CreateDerivedCollection(c => new CoinViewModel(this, c), c => !c.SpentOrCoinJoinInProcess, (first, second) => first.Amount.CompareTo(second.Amount), RxApp.MainThreadScheduler);
+ Coins = coins.CreateDerivedCollection(c => new CoinViewModel(this, c), c => !c.SpentOrCoinJoinInProcess, (first, second) => first.Amount.CompareTo(second.Amount), RxApp.MainThreadScheduler);
}
public ObservableCollection<CoinViewModel> SelectedCoins
@@ -26,7 +26,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set { this.RaiseAndSetIfChanged(ref _selectedCoins, value); }
}
- public IEnumerable<CoinViewModel> Coins
+ public IReactiveDerivedList<CoinViewModel> Coins
{
get { return _coins; }
set { this.RaiseAndSetIfChanged(ref _coins, value); }

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -12,7 +12,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public SendTabViewModel(WalletViewModel walletViewModel)
: base("Send", walletViewModel)
{
- CoinList = new CoinListViewModel();
+ CoinList = new CoinListViewModel(Global.WalletService.Coins);
}
public CoinListViewModel CoinList

pass coins into coin list vm.