fix removing of items from send tab when coins are spent
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -24,10 +24,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
this.RaisePropertyChanged(nameof(Confirmed));
});
-
- History = "Calculate History";
}
+ public SmartCoin Model => _model;
+
public bool Confirmed => _model.Confirmed;
public bool IsSelected

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/SendTabView.xaml
<Button Content="Max" Command="{Binding MaxCommand}" />
<TextBox Text="{Binding Amount}" Watermark="Amount" UseFloatingWatermark="True" MinWidth="100" />
<StackPanel>
+ <TextBlock Text="Fee:" />
<Slider Minimum="2" Maximum="1008" Value="{Binding Fee}" />
<StackPanel Orientation="Horizontal" Gap="4">
<TextBlock Text="Confirmation Expected In:" />

MODIFY
WalletWasabi/Models/SmartCoin.cs
WalletWasabi/Models/SmartCoin.cs
@@ -16,6 +16,7 @@ namespace WalletWasabi.Models
private Height _height;
private string _label;
private uint256 _spenderTransactionId;
+ private bool _coinJoinInProcess;
[JsonProperty(Order = 1)]
[JsonConverter(typeof(Uint256JsonConverter))]
@@ -80,14 +81,19 @@ namespace WalletWasabi.Models
if (value != _spenderTransactionId)
{
var rememberSpentOrCoinJoinInProcess = SpentOrCoinJoinInProcess;
+
+ if (_spenderTransactionId != value)
+ {
_spenderTransactionId = value;
+ RaisePropertyChanged();
+ }
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Label)));
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Unspent)));
+ RaisePropertyChanged(nameof(Label));
+ RaisePropertyChanged(nameof(Unspent));
if (rememberSpentOrCoinJoinInProcess != SpentOrCoinJoinInProcess)
{
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SpentOrCoinJoinInProcess)));
+ RaisePropertyChanged(nameof(SpentOrCoinJoinInProcess));
}
}
}
@@ -102,7 +108,20 @@ namespace WalletWasabi.Models
[JsonProperty(Order = 10)]
[JsonConverter(typeof(FunnyBoolJsonConverter))]
- public bool CoinJoinInProcess { get; set; }
+ public bool CoinJoinInProcess
+ {
+ get => _coinJoinInProcess;
+ set
+ {
+ if (_coinJoinInProcess != value)
+ {
+ _coinJoinInProcess = value;
+
+ RaisePropertyChanged();
+ RaisePropertyChanged(nameof(SpentOrCoinJoinInProcess));
+ }
+ }
+ }
/// <summary>
/// AnonymitySet - 1
@@ -175,6 +194,11 @@ namespace WalletWasabi.Models
return new TxoRef(TransactionId, Index);
}
+ private void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "")
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
#region EqualityAndComparison
public override bool Equals(object obj) => obj is SmartCoin && this == (SmartCoin)obj;

fix removing of items from send tab when coins are spent