Skip to content
Permalink
Browse files

[Skip ci] Refresh percoin status according to mixing state fix

  • Loading branch information...
molnard committed Nov 20, 2018
1 parent 8e38c35 commit a04c3a04b668ac1b3d37c43568fe5ca198168b8c
Showing with 3 additions and 9 deletions.
  1. +3 −9 WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -49,11 +49,6 @@ public CoinViewModel(SmartCoin model)
RefreshSmartCoinStatus();
});

this.WhenAnyValue(x => x.Status).ObserveOn(RxApp.MainThreadScheduler).Subscribe(_ =>
{
this.RaisePropertyChanged(nameof(ToolTip));
});

Global.IndexDownloader.WhenAnyValue(x => x.BestHeight).ObserveOn(RxApp.MainThreadScheduler).Subscribe(_ =>
{
this.RaisePropertyChanged(nameof(Confirmations));
@@ -65,7 +60,7 @@ public CoinViewModel(SmartCoin model)

private void ChaumianClient_StateUpdated(object sender, EventArgs e)
{
this.RaisePropertyChanged(nameof(Status));
RefreshSmartCoinStatus();
}

public SmartCoin Model { get; }
@@ -99,7 +94,7 @@ public string ToolTip
case SmartCoinStatus.Confirmed: return "This coin is confirmed.";
case SmartCoinStatus.Unconfirmed: return "This coin is unconfirmed.";
case SmartCoinStatus.MixingOnWaitingList: return "This coin is waiting for its turn to be coinjoined.";
case SmartCoinStatus.MixingBanned: return $"The coordinator banned this coin from participation until {Model.BannedUntilUtc.Value.ToString("yyyy-MM-dd HH:mm", CultureInfo.InvariantCulture)}.";
case SmartCoinStatus.MixingBanned: return $"The coordinator banned this coin from participation until {Model?.BannedUntilUtc?.ToString("yyyy - MM - dd HH: mm", CultureInfo.InvariantCulture)}.";
case SmartCoinStatus.MixingInputRegistration: return "This coin is registered for coinjoin.";
case SmartCoinStatus.MixingConnectionConfirmation: return "This coin is currently in Connection Confirmation phase.";
case SmartCoinStatus.MixingOutputRegistration: return "This coin is currently in Output Registration phase.";
@@ -129,8 +124,6 @@ public string ToolTip

public string History => string.Join(", ", Global.WalletService.GetHistory(Model, Enumerable.Empty<SmartCoin>()).Select(x => x.Label).Distinct());



public SmartCoinStatus Status
{
get
@@ -140,6 +133,7 @@ public SmartCoinStatus Status
set
{
this.RaiseAndSetIfChanged(ref _smartCoinStatus, value);
this.RaisePropertyChanged(nameof(ToolTip));
}
}

0 comments on commit a04c3a0

Please sign in to comment.
You can’t perform that action at this time.