[skip ci] Add SmartCoinStatus
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -7,17 +7,14 @@ using WalletWasabi.Models;
using NBitcoin;
using System.Reactive.Linq;
using System.Linq;
+using WalletWasabi.Gui.Models;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
- public enum CoinStatusEnum
- {
- None,
- }
public class CoinViewModel : ViewModelBase
{
private bool _isSelected;
- private CoinStatusEnum _status;
+ private SmartCoinStatus _status;
public CoinViewModel(SmartCoin model)
{
@@ -82,12 +79,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public string History => string.Join(", ", Global.WalletService.GetHistory(Model, Enumerable.Empty<SmartCoin>()).Select(x => x.Label).Distinct());
- public CoinStatusEnum Status
+ public SmartCoinStatus Status
{
get => _status;
set { this.RaiseAndSetIfChanged(ref _status, value); }
}
-
-
}
}

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabViewModel.cs
@@ -147,7 +147,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
var txinfo = new TransactionInfo
{
DateTime = txr.dateTime.ToLocalTime(),
- Confirmed = txr.height != Models.Height.MemPool && txr.height != Models.Height.Unknown,
+ Confirmed = txr.height != WalletWasabi.Models.Height.MemPool && txr.height != WalletWasabi.Models.Height.Unknown,
AmountBtc = $"{txr.amount.ToString(fplus: true, trimExcessZero: true)}",
Label = txr.label,
TransactionId = txr.transactionId.ToString()

MODIFY
WalletWasabi.Gui/Converters/CoinStatusColorConverter.cs
WalletWasabi.Gui/Converters/CoinStatusColorConverter.cs
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.Text;
using WalletWasabi.Gui.Controls.WalletExplorer;
+using WalletWasabi.Gui.Models;
using WalletWasabi.Models.ChaumianCoinJoin;
namespace WalletWasabi.Gui.Converters
@@ -13,12 +14,13 @@ namespace WalletWasabi.Gui.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- if (value is CoinStatusEnum status)
+ if (value is SmartCoinStatus status)
{
switch (status)
{
- case CoinStatusEnum.None:
+ case SmartCoinStatus.Confirmed:
return Brushes.Black;
+
default:
return Brushes.Transparent;
}

MODIFY
WalletWasabi.Gui/Converters/CoinStatusStringConverter.cs
WalletWasabi.Gui/Converters/CoinStatusStringConverter.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.Text;
using WalletWasabi.Gui.Controls.WalletExplorer;
+using WalletWasabi.Gui.Models;
using WalletWasabi.Models.ChaumianCoinJoin;
namespace WalletWasabi.Gui.Converters
@@ -12,7 +13,7 @@ namespace WalletWasabi.Gui.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- if (value is CoinStatusEnum status)
+ if (value is SmartCoinStatus status)
{
return status.ToString();
}
@@ -23,7 +24,7 @@ namespace WalletWasabi.Gui.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
var s = value.ToString();
- return Enum.Parse<CoinStatusEnum>(s);
+ return Enum.Parse<SmartCoinStatus>(s);
}
}
}

[skip ci] Add SmartCoinStatus