add bitcoin store params
MODIFY
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
@@ -83,7 +83,7 @@ namespace WalletWasabi.Fluent.ViewModels
}
else if (_walletDictionary[wallet] is ClosedWalletViewModel { IsLoggedIn: true } cwvm && wallet.State == WalletState.Started)
{
- OpenClosedWallet(walletManager, uiConfig, cwvm);
+ OpenClosedWallet(uiConfig, cwvm, bitcoinStore);
}
}
@@ -99,7 +99,7 @@ namespace WalletWasabi.Fluent.ViewModels
{
WalletViewModelBase vm = (wallet.State <= WalletState.Starting)
? ClosedWalletViewModel.Create(this, wallet)
- : WalletViewModel.Create(uiConfig, wallet);
+ : WalletViewModel.Create(uiConfig, wallet, bitcoinStore);
InsertWallet(vm);
});
@@ -138,13 +138,13 @@ namespace WalletWasabi.Fluent.ViewModels
}
}
- private void OpenClosedWallet(WalletManager walletManager, UiConfig uiConfig, ClosedWalletViewModel closedWalletViewModel)
+ private void OpenClosedWallet(UiConfig uiConfig, ClosedWalletViewModel closedWalletViewModel, BitcoinStore bitcoinStore)
{
IsLoadingWallet = true;
RemoveWallet(closedWalletViewModel);
- var walletViewModelItem = OpenWallet(walletManager, uiConfig, closedWalletViewModel.Wallet);
+ var walletViewModelItem = OpenWallet(uiConfig, closedWalletViewModel.Wallet, bitcoinStore);
if (!_walletActionsDictionary.TryGetValue(walletViewModelItem, out var actions))
{
@@ -161,14 +161,14 @@ namespace WalletWasabi.Fluent.ViewModels
IsLoadingWallet = false;
}
- private WalletViewModel OpenWallet(WalletManager walletManager, UiConfig uiConfig, Wallet wallet)
+ private WalletViewModel OpenWallet(UiConfig uiConfig, Wallet wallet, BitcoinStore bitcoinStore)
{
if (_wallets.Any(x => x.Title == wallet.WalletName))
{
throw new Exception("Wallet already opened.");
}
- var walletViewModel = WalletViewModel.Create(uiConfig, wallet);
+ var walletViewModel = WalletViewModel.Create(uiConfig, wallet, bitcoinStore);
InsertWallet(walletViewModel);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/HardwareWallet/HardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/HardwareWallet/HardwareWalletViewModel.cs
using WalletWasabi.Blockchain.TransactionBroadcasting;
using WalletWasabi.Gui;
+using WalletWasabi.Stores;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.HardwareWallet
{
public class HardwareWalletViewModel : WalletViewModel
{
- internal HardwareWalletViewModel(UiConfig uiConfig, Wallet wallet) : base(uiConfig, wallet)
+ internal HardwareWalletViewModel(UiConfig uiConfig, Wallet wallet, BitcoinStore bitcoinStore) : base(uiConfig, wallet, bitcoinStore)
{
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/History/HistoryViewModel.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.History
_histories = new ObservableCollection<HistoryItemViewModel>();
}
- private async Task TryRewriteTableAsync()
+ public async Task UpdateHistoryAsync()
{
try
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -7,16 +7,18 @@ using System.Reactive.Disposables;
using System.Reactive.Linq;
using WalletWasabi.Blockchain.TransactionBroadcasting;
using WalletWasabi.Fluent.ViewModels.Wallets.HardwareWallet;
+using WalletWasabi.Fluent.ViewModels.Wallets.History;
using WalletWasabi.Fluent.ViewModels.Wallets.WatchOnlyWallet;
using WalletWasabi.Gui;
using WalletWasabi.Logging;
+using WalletWasabi.Stores;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets
{
public partial class WalletViewModel : WalletViewModelBase
{
- protected WalletViewModel(UiConfig uiConfig, Wallet wallet) : base(wallet)
+ protected WalletViewModel(UiConfig uiConfig, Wallet wallet, BitcoinStore bitcoinStore) : base(wallet)
{
Disposables = Disposables is null ? new CompositeDisposable() : throw new NotSupportedException($"Cannot open {GetType().Name} before closing it.");
@@ -42,19 +44,23 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
}
})
.DisposeWith(Disposables);
+
+ History = new HistoryViewModel(wallet, bitcoinStore);
}
private CompositeDisposable Disposables { get; set; }
public override string IconName => "web_asset_regular";
- public static WalletViewModel Create(UiConfig uiConfig, Wallet wallet)
+ public HistoryViewModel History { get; }
+
+ public static WalletViewModel Create(UiConfig uiConfig, Wallet wallet, BitcoinStore bitcoinStore)
{
return wallet.KeyManager.IsHardwareWallet
- ? new HardwareWalletViewModel(uiConfig, wallet)
+ ? new HardwareWalletViewModel(uiConfig, wallet, bitcoinStore)
: wallet.KeyManager.IsWatchOnly
- ? new WatchOnlyWalletViewModel(uiConfig, wallet)
- : new WalletViewModel(uiConfig, wallet);
+ ? new WatchOnlyWalletViewModel(uiConfig, wallet, bitcoinStore)
+ : new WalletViewModel(uiConfig, wallet, bitcoinStore);
}
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WatchOnlyWallet/WatchOnlyWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WatchOnlyWallet/WatchOnlyWalletViewModel.cs
using WalletWasabi.Blockchain.TransactionBroadcasting;
using WalletWasabi.Gui;
+using WalletWasabi.Stores;
using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.WatchOnlyWallet
{
public class WatchOnlyWalletViewModel : WalletViewModel
{
- internal WatchOnlyWalletViewModel(UiConfig uiConfig, Wallet wallet) : base(uiConfig, wallet)
+ internal WatchOnlyWalletViewModel(UiConfig uiConfig, Wallet wallet, BitcoinStore bitcoinStore) : base(uiConfig, wallet, bitcoinStore)
{
}
}

add bitcoin store params