remove round status code
DELETE
WalletWasabi.Fluent/ViewModels/Wallets/Home/Tiles/RoundStatusTileViewModel.cs
-using System;
-using System.Reactive.Disposables;
-using System.Reactive.Linq;
-using ReactiveUI;
-using WalletWasabi.CoinJoin.Common.Models;
-using WalletWasabi.Gui.Models;
-using WalletWasabi.Wallets;
-
-namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles
-{
- public partial class RoundStatusTileViewModel : TileViewModel
- {
- private readonly Wallet _wallet;
- [AutoNotify] private long _roundId;
- [AutoNotify] private RoundPhaseState _roundPhaseState;
- [AutoNotify] private DateTimeOffset _roundTimesout;
- [AutoNotify] private string? _timeLeftTillRoundTimeout;
- [AutoNotify] private int _peersRegistered;
- [AutoNotify] private int _peersNeeded;
- [AutoNotify] private int _selectedIndex;
-
- public RoundStatusTileViewModel(Wallet wallet)
- {
- _wallet = wallet;
- }
-
- protected override void OnActivated(CompositeDisposable disposables)
- {
- base.OnActivated(disposables);
-
- Observable.FromEventPattern(_wallet.ChaumianClient, nameof(Wallet.ChaumianClient.CoinQueued))
- .Merge(Observable.FromEventPattern(_wallet.ChaumianClient, nameof(Wallet.ChaumianClient.OnDequeue)))
- .Merge(Observable.FromEventPattern(_wallet.ChaumianClient, nameof(Wallet.ChaumianClient.StateUpdated)))
- .ObserveOn(RxApp.MainThreadScheduler)
- .Subscribe(_ => UpdateStates())
- .DisposeWith(disposables);
-
- var mostAdvancedRound = _wallet.ChaumianClient.State.GetMostAdvancedRoundOrDefault();
-
- if (mostAdvancedRound is { })
- {
- RoundId = mostAdvancedRound.State.RoundId;
-
- RoundPhaseState = new RoundPhaseState(mostAdvancedRound.State.Phase,
- _wallet.ChaumianClient?.State?.IsInErrorState ?? false);
-
- RoundTimesout = mostAdvancedRound.State.Phase == RoundPhase.InputRegistration
- ? mostAdvancedRound.State.InputRegistrationTimesout
- : DateTimeOffset.UtcNow;
-
- PeersRegistered = mostAdvancedRound.State.RegisteredPeerCount;
- PeersNeeded = mostAdvancedRound.State.RequiredPeerCount;
- }
- else
- {
- RoundId = -1;
- RoundPhaseState = new RoundPhaseState(RoundPhase.InputRegistration, false);
- RoundTimesout = DateTimeOffset.UtcNow;
- PeersRegistered = 0;
- PeersNeeded = 100;
- }
-
- Observable.Interval(TimeSpan.FromSeconds(1))
- .ObserveOn(RxApp.MainThreadScheduler)
- .Subscribe(_ =>
- {
- var left = RoundTimesout - DateTimeOffset.UtcNow;
- TimeLeftTillRoundTimeout =
- (left > TimeSpan.Zero ? left : TimeSpan.Zero).ToString("hh\\:mm\\:ss"); // Make sure cannot be less than zero.
- })
- .DisposeWith(disposables);
-
- Observable.Interval(TimeSpan.FromSeconds(8))
- .ObserveOn(RxApp.MainThreadScheduler)
- .Subscribe(_ =>
- {
- var index = SelectedIndex;
-
- index++;
-
- if (index > 3)
- {
- index = 0;
- }
-
- SelectedIndex = index;
- })
- .DisposeWith(disposables);
- }
-
- private void UpdateStates()
- {
- var chaumianClient = _wallet?.ChaumianClient;
-
- if (chaumianClient is null)
- {
- return;
- }
-
- var mostAdvancedRound = chaumianClient.State.GetMostAdvancedRoundOrDefault();
-
- RoundId = mostAdvancedRound.State.RoundId;
- if (!chaumianClient.State.IsInErrorState)
- {
- RoundPhaseState = new RoundPhaseState(mostAdvancedRound.State.Phase, false);
- RoundTimesout = mostAdvancedRound.State.Phase == RoundPhase.InputRegistration
- ? mostAdvancedRound.State.InputRegistrationTimesout
- : DateTimeOffset.UtcNow;
- }
- else
- {
- RoundPhaseState = new RoundPhaseState(RoundPhaseState.Phase, true);
- }
-
- this.RaisePropertyChanged(nameof(RoundPhaseState));
- this.RaisePropertyChanged(nameof(RoundTimesout));
- PeersRegistered = mostAdvancedRound.State.RegisteredPeerCount;
- PeersNeeded = mostAdvancedRound.State.RequiredPeerCount;
- }
- }
-}
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatus/RoundStatusLargeTileView.axaml
-<UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
- mc:Ignorable="d" d:DesignWidth="330" d:DesignHeight="330"
- x:CompileBindings="True" x:DataType="vm:RoundStatusTileViewModel"
- x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus.RoundStatusLargeTileView">
- <DockPanel>
- <TextBlock Text="Mixing Status" DockPanel.Dock="Top" />
- <Carousel Margin="0 10" VerticalAlignment="Center" SelectedIndex="{Binding SelectedIndex}">
- <Carousel.PageTransition>
- <PageSlide Duration="0.25" Orientation="Vertical">
- <PageSlide.SlideInEasing>
- <Easing>0.4,0,0.6,1</Easing>
- </PageSlide.SlideInEasing>
- <PageSlide.SlideOutEasing>
- <Easing>0.4,0,0.6,1</Easing>
- </PageSlide.SlideOutEasing>
- </PageSlide>
- </Carousel.PageTransition>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource people_regular}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding PeersRegistered}" FontSize="24" />
- <TextBlock Text="Peers waiting to mix" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource btc_logo}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="4328 BTC" FontSize="24" />
- <TextBlock Text="Waiting to be mixed" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource timer_regular}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding TimeLeftTillRoundTimeout}" FontSize="24" />
- <TextBlock Text="Until next round" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
- </Carousel>
- </DockPanel>
-</UserControl>
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatus/RoundStatusLargeTileView.axaml.cs
-using Avalonia;
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus
-{
- public class RoundStatusLargeTileView : UserControl
- {
- public RoundStatusLargeTileView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
- }
-}
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatus/RoundStatusMediumTileView.axaml
-<UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
- mc:Ignorable="d" d:DesignWidth="330" d:DesignHeight="150"
- x:CompileBindings="True" x:DataType="vm:RoundStatusTileViewModel"
- x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus.RoundStatusMediumTileView">
- <DockPanel>
- <TextBlock Text="Mixing Status" DockPanel.Dock="Top" />
- <Carousel Margin="0 10" VerticalAlignment="Center" SelectedIndex="{Binding SelectedIndex}">
- <Carousel.PageTransition>
- <PageSlide Duration="0.25" Orientation="Vertical">
- <PageSlide.SlideInEasing>
- <Easing>0.4,0,0.6,1</Easing>
- </PageSlide.SlideInEasing>
- <PageSlide.SlideOutEasing>
- <Easing>0.4,0,0.6,1</Easing>
- </PageSlide.SlideOutEasing>
- </PageSlide>
- </Carousel.PageTransition>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource people_regular}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding PeersRegistered}" FontSize="24" />
- <TextBlock Text="Peers waiting to mix" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource btc_logo}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="4328 BTC" FontSize="24" />
- <TextBlock Text="Waiting to be mixed" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource timer_regular}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding TimeLeftTillRoundTimeout}" FontSize="24" />
- <TextBlock Text="Until next round" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
- </Carousel>
- </DockPanel>
-</UserControl>
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatus/RoundStatusMediumTileView.axaml.cs
-using Avalonia;
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus
-{
- public class RoundStatusMediumTileView : UserControl
- {
- public RoundStatusMediumTileView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
- }
-}
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatus/RoundStatusWideTileView.axaml
-<UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
- mc:Ignorable="d" d:DesignWidth="660" d:DesignHeight="330"
- x:CompileBindings="True" x:DataType="vm:RoundStatusTileViewModel"
- x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus.RoundStatusWideTileView">
- <DockPanel>
- <TextBlock Text="Mixing Status" DockPanel.Dock="Top" />
- <Carousel Margin="0 10" VerticalAlignment="Center" SelectedIndex="{Binding SelectedIndex}">
- <Carousel.PageTransition>
- <PageSlide Duration="0.25" Orientation="Vertical">
- <PageSlide.SlideInEasing>
- <Easing>0.4,0,0.6,1</Easing>
- </PageSlide.SlideInEasing>
- <PageSlide.SlideOutEasing>
- <Easing>0.4,0,0.6,1</Easing>
- </PageSlide.SlideOutEasing>
- </PageSlide>
- </Carousel.PageTransition>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource people_regular}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding PeersRegistered}" FontSize="24" />
- <TextBlock Text="Peers waiting to mix" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource btc_logo}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="4328 BTC" FontSize="24" />
- <TextBlock Text="Waiting to be mixed" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
-
- <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" Spacing="16">
- <PathIcon Data="{StaticResource timer_regular}" Height="50" Width="50"
- Foreground="{DynamicResource SystemAccentColor}" />
- <StackPanel VerticalAlignment="Center">
- <TextBlock Text="{Binding TimeLeftTillRoundTimeout}" FontSize="24" />
- <TextBlock Text="Until next round" Opacity="0.8" FontSize="12" />
- </StackPanel>
- </StackPanel>
- </Carousel>
- </DockPanel>
-</UserControl>
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatus/RoundStatusWideTileView.axaml.cs
-using Avalonia;
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus
-{
- public class RoundStatusWideTileView : UserControl
- {
- public RoundStatusWideTileView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
- }
-}
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatusTileView.axaml
-<UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Home.Tiles"
- xmlns:rs="clr-namespace:WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatus"
- xmlns:controls="clr-namespace:WalletWasabi.Fluent.Controls"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:CompileBindings="True" x:DataType="vm:RoundStatusTileViewModel"
- x:Class="WalletWasabi.Fluent.Views.Wallets.Home.Tiles.RoundStatusTileView">
- <controls:TileControl TileSize="{Binding CurrentTileSize}">
- <rs:RoundStatusMediumTileView />
- <controls:TileControl.LargeSizeContent>
- <rs:RoundStatusLargeTileView />
- </controls:TileControl.LargeSizeContent>
- <controls:TileControl.WideSizeContent>
- <rs:RoundStatusWideTileView />
- </controls:TileControl.WideSizeContent>
- </controls:TileControl>
-</UserControl>
\ No newline at end of file

DELETE
WalletWasabi.Fluent/Views/Wallets/Home/Tiles/RoundStatusTileView.axaml.cs
-using Avalonia;
-using Avalonia.Controls;
-using Avalonia.Markup.Xaml;
-
-namespace WalletWasabi.Fluent.Views.Wallets.Home.Tiles
-{
- public class RoundStatusTileView : UserControl
- {
- public RoundStatusTileView()
- {
- InitializeComponent();
- }
-
- private void InitializeComponent()
- {
- AvaloniaXamlLoader.Load(this);
- }
- }
-}
\ No newline at end of file

remove round status code