Make registration not visible when round kicks off
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
<converters:LurkingWifeModeStringConverter x:Key="LurkingWifeModeStringConverter" />
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<converters:TimeSpanStringConverter x:Key="TimeSpanStringConverter" />
+ <converters:TimeSpanVisibilityConverter x:Key="TimeSpanVisibilityConverter" />
</UserControl.Resources>
<Grid Margin="20">
<Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Spacing="4" Margin="0 12">
<TextBlock VerticalAlignment="Center" Foreground="YellowGreen" Text="{Binding Phase, Converter={StaticResource PhaseStringConverter}}" />
</StackPanel>
- <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Spacing="4">
- <TextBlock Text="Registration Ends:" />
+ <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Spacing="4" IsVisible="{Binding TimeLeftTillRoundTimeout, Converter={StaticResource TimeSpanVisibilityConverter}}">
+ <TextBlock Text="Registration Ends In:" />
</StackPanel>
- <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Spacing="4">
+ <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" Spacing="4" IsVisible="{Binding TimeLeftTillRoundTimeout, Converter={StaticResource TimeSpanVisibilityConverter}}">
<TextBlock Foreground="YellowGreen" Text="{Binding TimeLeftTillRoundTimeout, Converter={StaticResource TimeSpanStringConverter}}" />
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Spacing="4">

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -171,7 +171,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
RoundId = mostAdvancedRound.State.RoundId;
Phase = mostAdvancedRound.State.Phase;
- RoundTimesout = mostAdvancedRound.State.InputRegistrationTimesout;
+ RoundTimesout = mostAdvancedRound.State.Phase == CcjRoundPhase.InputRegistration ? mostAdvancedRound.State.InputRegistrationTimesout : DateTimeOffset.UtcNow;
PeersRegistered = mostAdvancedRound.State.RegisteredPeerCount;
PeersNeeded = mostAdvancedRound.State.RequiredPeerCount;
}
@@ -301,7 +301,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
if (!Global.ChaumianClient.State.IsInErrorState)
{
Phase = mostAdvancedRound.State.Phase;
- RoundTimesout = mostAdvancedRound.State.InputRegistrationTimesout;
+ RoundTimesout = mostAdvancedRound.State.Phase == CcjRoundPhase.InputRegistration ? mostAdvancedRound.State.InputRegistrationTimesout : DateTimeOffset.UtcNow;
}
this.RaisePropertyChanged(nameof(Phase));
this.RaisePropertyChanged(nameof(RoundTimesout));

ADD
WalletWasabi.Gui/Converters/TimeSpanVisibilityConverter.cs
+using Avalonia.Data.Converters;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+
+namespace WalletWasabi.Gui.Converters
+{
+ public class TimeSpanVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is TimeSpan ts)
+ {
+ return ts == TimeSpan.Zero ? false : true;
+ }
+
+ throw new InvalidOperationException();
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
+}

Make registration not visible when round kicks off